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