From: Sasa M. <sa...@us...> - 2004-07-21 08:27:49
|
Update of /cvsroot/jrobin/src/org/jrobin/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11525/org/jrobin/core Modified Files: FetchRequest.java RrdDb.java RrdDbPool.java RrdDef.java Sample.java Log Message: Minor changes Index: RrdDbPool.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/core/RrdDbPool.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** RrdDbPool.java 21 Jul 2004 07:10:25 -0000 1.9 --- RrdDbPool.java 21 Jul 2004 08:27:40 -0000 1.10 *************** *** 31,37 **** * Class to represent the pool of open RRD files.<p> * - * <b>WARNING:</b> The pool cannot be used to manipulate RrdDb objects - * with {@link RrdBackend backends} different from default. - * * To open already existing RRD file with JRobin, you have to create a * {@link org.jrobin.core.RrdDb RrdDb} object by specifying RRD file path --- 31,34 ---- *************** *** 98,101 **** --- 95,101 ---- * * The pool is thread-safe.<p> + * + * <b>WARNING:</b> The pool cannot be used to manipulate RrdDb objects + * with {@link RrdBackend backends} different from default.<p> */ public class RrdDbPool implements Runnable { *************** *** 303,307 **** try { ! debug("GC: sleeping (" + rrdMap.size() + "/" + rrdGcList.size() + ")"); wait(); debug("GC: running"); --- 303,312 ---- try { ! debug("GC: waiting: " + ! rrdMap.size() + " open, " + ! rrdGcList.size() + " released, " + ! "capacity = " + capacity + ", " + ! "hits = " + poolHitsCount + ", " + ! "requests = " + poolRequestsCount); wait(); debug("GC: running"); *************** *** 376,379 **** --- 381,385 ---- public synchronized void setCapacity(int capacity) { this.capacity = capacity; + debug("Capacity set to: " + capacity); } Index: RrdDef.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/core/RrdDef.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** RrdDef.java 20 Jul 2004 08:21:02 -0000 1.13 --- RrdDef.java 21 Jul 2004 08:27:40 -0000 1.14 *************** *** 425,430 **** */ public String dump() { ! StringBuffer buffer = new StringBuffer(RrdDb.RRDTOOL); ! buffer.append(" create " + path); buffer.append(" --start " + getStartTime()); buffer.append(" --step " + getStep() + " "); --- 425,430 ---- */ public String dump() { ! StringBuffer buffer = new StringBuffer("create \""); ! buffer.append(path + "\""); buffer.append(" --start " + getStartTime()); buffer.append(" --step " + getStep() + " "); Index: FetchRequest.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/core/FetchRequest.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FetchRequest.java 28 May 2004 10:22:47 -0000 1.6 --- FetchRequest.java 21 Jul 2004 08:27:40 -0000 1.7 *************** *** 148,153 **** */ public String dump() { ! return RrdDb.RRDTOOL + " fetch " + parentDb.getRrdBackend().getPath() + ! " " + consolFun + " --start " + fetchStart + " --end " + fetchEnd + (resolution > 1? " --resolution " + resolution: ""); } --- 148,153 ---- */ public String dump() { ! return "fetch \"" + parentDb.getRrdBackend().getPath() + ! "\" " + consolFun + " --start " + fetchStart + " --end " + fetchEnd + (resolution > 1? " --resolution " + resolution: ""); } Index: RrdDb.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/core/RrdDb.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** RrdDb.java 14 Jul 2004 12:52:34 -0000 1.24 --- RrdDb.java 21 Jul 2004 08:27:40 -0000 1.25 *************** *** 74,78 **** public static final int EXCEPTION_IF_LOCKED = 2; ! static final String RRDTOOL = "rrdtool"; static final int XML_INITIAL_BUFFER_CAPACITY = 100000; // bytes private static int lockMode = NO_LOCKS; --- 74,78 ---- public static final int EXCEPTION_IF_LOCKED = 2; ! // static final String RRDTOOL = "rrdtool"; static final int XML_INITIAL_BUFFER_CAPACITY = 100000; // bytes private static int lockMode = NO_LOCKS; Index: Sample.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/core/Sample.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Sample.java 2 Jun 2004 08:55:48 -0000 1.9 --- Sample.java 21 Jul 2004 08:27:40 -0000 1.10 *************** *** 241,246 **** */ public String dump() { ! StringBuffer buffer = new StringBuffer(RrdDb.RRDTOOL); ! buffer.append(" update " + parentDb.getRrdBackend().getPath() + " " + time); for(int i = 0; i < values.length; i++) { buffer.append(":"); --- 241,246 ---- */ public String dump() { ! StringBuffer buffer = new StringBuffer("update \""); ! buffer.append(parentDb.getRrdBackend().getPath() + "\" " + time); for(int i = 0; i < values.length; i++) { buffer.append(":"); |