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