1 25 26 package org.jrobin.core; 27 28 import java.io.IOException ; 29 30 class RrdDouble extends RrdPrimitive { 31 RrdDouble(RrdUpdater updater) throws IOException { 32 super(updater, RrdDouble.RRD_DOUBLE); 33 } 34 35 void set(double value) throws IOException { 36 if(cache.setDouble(value)) { 37 writeDouble(value); 38 } 39 } 40 41 double get() throws IOException { 42 if(cache.isEmpty()) { 43 cache.setDouble(readDouble()); 44 } 45 return cache.getDouble(); 46 } 47 } 48 | Popular Tags |