Update of /cvsroot/jrobin/src/org/jrobin/core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10839/org/jrobin/core
Modified Files:
RrdCacher.java RrdDouble.java RrdInt.java RrdLong.java
RrdPrimitive.java RrdString.java
Log Message:
Minor improvements of primitive classes (cache moved to the base class)
Index: RrdCacher.java
===================================================================
RCS file: /cvsroot/jrobin/src/org/jrobin/core/RrdCacher.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** RrdCacher.java 2 Jun 2004 08:55:48 -0000 1.2
--- RrdCacher.java 29 Jun 2004 12:59:35 -0000 1.3
***************
*** 93,95 ****
--- 93,99 ----
}
+ final void clearCache() {
+ cached = false;
+ }
+
}
Index: RrdString.java
===================================================================
RCS file: /cvsroot/jrobin/src/org/jrobin/core/RrdString.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** RrdString.java 20 May 2004 10:29:33 -0000 1.8
--- RrdString.java 29 Jun 2004 12:59:35 -0000 1.9
***************
*** 29,34 ****
class RrdString extends RrdPrimitive {
- private RrdCacher cache = new RrdCacher();
-
RrdString(RrdUpdater updater) throws IOException {
super(updater, RrdPrimitive.RRD_STRING);
--- 29,32 ----
Index: RrdLong.java
===================================================================
RCS file: /cvsroot/jrobin/src/org/jrobin/core/RrdLong.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** RrdLong.java 20 May 2004 10:29:33 -0000 1.8
--- RrdLong.java 29 Jun 2004 12:59:35 -0000 1.9
***************
*** 29,34 ****
class RrdLong extends RrdPrimitive {
- private RrdCacher cache = new RrdCacher();
-
RrdLong(RrdUpdater updater) throws IOException {
super(updater, RrdPrimitive.RRD_LONG);
--- 29,32 ----
Index: RrdPrimitive.java
===================================================================
RCS file: /cvsroot/jrobin/src/org/jrobin/core/RrdPrimitive.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** RrdPrimitive.java 21 May 2004 10:40:50 -0000 1.7
--- RrdPrimitive.java 29 Jun 2004 12:59:35 -0000 1.8
***************
*** 37,40 ****
--- 37,42 ----
private final long pointer;
+ protected RrdCacher cache = new RrdCacher();
+
RrdPrimitive(RrdUpdater updater, int type) throws IOException {
this(updater, type, 1);
***************
*** 109,111 ****
--- 111,117 ----
backend.writeString(pointer, value);
}
+
+ void clearCache() {
+ cache.clearCache();
+ }
}
Index: RrdInt.java
===================================================================
RCS file: /cvsroot/jrobin/src/org/jrobin/core/RrdInt.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** RrdInt.java 20 May 2004 10:29:33 -0000 1.8
--- RrdInt.java 29 Jun 2004 12:59:35 -0000 1.9
***************
*** 29,34 ****
class RrdInt extends RrdPrimitive {
- RrdCacher cache = new RrdCacher();
-
RrdInt(RrdUpdater updater) throws IOException {
super(updater, RrdPrimitive.RRD_INT);
--- 29,32 ----
Index: RrdDouble.java
===================================================================
RCS file: /cvsroot/jrobin/src/org/jrobin/core/RrdDouble.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** RrdDouble.java 20 May 2004 10:29:33 -0000 1.8
--- RrdDouble.java 29 Jun 2004 12:59:35 -0000 1.9
***************
*** 29,34 ****
class RrdDouble extends RrdPrimitive {
- private RrdCacher cache = new RrdCacher();
-
RrdDouble(RrdUpdater updater) throws IOException {
super(updater, RrdDouble.RRD_DOUBLE);
--- 29,32 ----
|