From: Sasa M. <sa...@us...> - 2004-05-31 09:05:30
|
Update of /cvsroot/jrobin/src/org/jrobin/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21037/org/jrobin/core Modified Files: RrdNioBackend.java RrdNioBackendFactory.java Log Message: Final changes in NIO Index: RrdNioBackend.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/core/RrdNioBackend.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RrdNioBackend.java 31 May 2004 08:01:46 -0000 1.4 --- RrdNioBackend.java 31 May 2004 09:04:50 -0000 1.5 *************** *** 117,123 **** --- 117,126 ---- */ protected void sync() { + //long t1 = System.currentTimeMillis(); synchronized(byteBuffer) { byteBuffer.force(); } + //long t2 = System.currentTimeMillis(); + //System.out.println("** SYNC ** " + (t2 - t1) + " millis"); } Index: RrdNioBackendFactory.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/core/RrdNioBackendFactory.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RrdNioBackendFactory.java 30 May 2004 10:16:00 -0000 1.4 --- RrdNioBackendFactory.java 31 May 2004 09:04:51 -0000 1.5 *************** *** 47,52 **** /** See {@link #setSyncMode(int) for explanation } */ public static final int SYNC_BACKGROUND = 5; ! /** See {@link #setSyncPeriod(int)} for explanation */ ! public static final int DEFAULT_SYNC_PERIOD = 60; // seconds private static int syncMode = SYNC_BACKGROUND; --- 47,57 ---- /** See {@link #setSyncMode(int) for explanation } */ public static final int SYNC_BACKGROUND = 5; ! /** ! * Period in seconds between consecutive synchronizations when ! * sync-mode is set to SYNC_BACKGROUND. By default in-memory cache will be ! * transferred to the disc every 300 seconds (5 minutes). Default value can be ! * changed via {@link #setSyncPeriod(int)} method. ! */ ! public static final int DEFAULT_SYNC_PERIOD = 300; // seconds private static int syncMode = SYNC_BACKGROUND; *************** *** 92,96 **** /** * Returns time between two consecutive background synchronizations. If not changed via ! * {@link #setSyncPeriod(int)} method call, defaults to DEFAULT_SYNC_PERIOD (60 seconds). * See {@link #setSyncPeriod(int)} for more information. * @return Time in seconds between consecutive background synchronizations. --- 97,101 ---- /** * Returns time between two consecutive background synchronizations. If not changed via ! * {@link #setSyncPeriod(int)} method call, defaults to {@link #DEFAULT_SYNC_PERIOD}. * See {@link #setSyncPeriod(int)} for more information. * @return Time in seconds between consecutive background synchronizations. |