Exemple #1
0
        static RrdBackendFactory()
        {
            RrdFileBackendFactory fileFactory = new RrdFileBackendFactory();

            registerFactory(fileFactory);
            //RrdMemoryBackendFactory memoryFactory = new RrdMemoryBackendFactory();
            //registerFactory(memoryFactory);
            //RrdNioBackendFactory nioFactory = new RrdNioBackendFactory();
            //registerFactory(nioFactory);
            //RrdSafeFileBackendFactory safeFactory = new RrdSafeFileBackendFactory();
            //registerFactory(safeFactory);
            selectDefaultFactory();
        }
Exemple #2
0
    static RrdBackendFactory()
    {

        RrdFileBackendFactory fileFactory = new RrdFileBackendFactory();
        registerFactory(fileFactory);
        //RrdMemoryBackendFactory memoryFactory = new RrdMemoryBackendFactory();
        //registerFactory(memoryFactory);
        //RrdNioBackendFactory nioFactory = new RrdNioBackendFactory();
        //registerFactory(nioFactory);
        //RrdSafeFileBackendFactory safeFactory = new RrdSafeFileBackendFactory();
        //registerFactory(safeFactory);
        selectDefaultFactory();
	}
Exemple #3
0
 /**
  * <p>Constructor used to create new RRD object from the definition. This RRD object will be backed
  * with a storage (backend) of the default type. Initially, storage type defaults to "NIO"
  * (RRD bytes will be put in a file on the disk). Default storage type can be changed with a static
  * {@link RrdBackendFactory#setDefaultFactory(String)} method call.</p>
  * <p/>
  * <p>New RRD file structure is specified with an object of class
  * {@link RrdDef <b>RrdDef</b>}. The underlying RRD storage is created as soon
  * as the constructor returns.</p>
  * <p/>
  * <p>Typical scenario:</p>
  * <p/>
  * <pre>
  * // create new RRD definition
  * RrdDef def = new RrdDef("test.rrd", 300);
  * def.addDatasource("input", DsType.DT_COUNTER, 600, 0, Double.NaN);
  * def.addDatasource("output", DsType.DT_COUNTER, 600, 0, Double.NaN);
  * def.addArchive(ConsolFun.CF_AVERAGE, 0.5, 1, 600);
  * def.addArchive(ConsolFun.CF_AVERAGE, 0.5, 6, 700);
  * def.addArchive(ConsolFun.CF_AVERAGE, 0.5, 24, 797);
  * def.addArchive(ConsolFun.CF_AVERAGE, 0.5, 288, 775);
  * def.addArchive(ConsolFun.CF_MAX, 0.5, 1, 600);
  * def.addArchive(ConsolFun.CF_MAX, 0.5, 6, 700);
  * def.addArchive(ConsolFun.CF_MAX, 0.5, 24, 797);
  * def.addArchive(ConsolFun.CF_MAX, 0.5, 288, 775);
  * <p/>
  * // RRD definition is now completed, create the database!
  * RrdDb rrd = new RrdDb(def);
  * // new RRD file has been created on your disk
  * </pre>
  *
  * @param rrdDef Object describing the structure of the new RRD file.
  * @Thrown in case of I/O error.
  */
 public RrdDb(RrdDef rrdDef)
     : this(rrdDef, RrdFileBackendFactory.getDefaultFactory())
 {
 }