| Modifier and Type | Method and Description |
|---|---|
RrdDb | build()Builds or imports a RrdDb instance. |
void | doimport()Import an external rrd data, import definition must have been done using setExternalPath(String) or setImporter(DataImporter). |
RrdDb.Builder | readOnly()Set the rrd as readonly |
RrdDb.Builder | setBackendFactory(RrdBackendFactory factory)Set the backend factory for this RRD. |
RrdDb.Builder | setExternalPath(String externalPath)Set when the builder will be used to import external data with a predefined source: XML
or RRDTool. |
RrdDb.Builder | setImporter(DataImporter importer)Set when the builder will be used to import external data with a custom source. |
RrdDb.Builder | setPath(String path)Set the path to an existing RRD. |
RrdDb.Builder | setPath(URI uri)Set the URI to an existing RRD. |
RrdDb.Builder | setPool(RrdDbPool pool)Set the pool that will be used and set usePool to true. |
(package private) RrdDb.Builder | setPoolInternal(RrdDbPool pool)Internal method used to memorize the pool, without generating a loop |
RrdDb.Builder | setReadOnly(boolean readOnly)Set whether the RRD is read-only. |
RrdDb.Builder | setRrdDef(RrdDef rrdDef)Set the RRD definition for creating a new RRD. |
RrdDb.Builder | setRrdToolImporter(String externalPath)Set when the builder will be used to import a RRDTool file. |
RrdDb.Builder | setUsePool(boolean usePool)Set whether to use the pool. |
RrdDb.Builder | usePool()Activate the pool usage. |
public RrdDb build() throws IOException
RrdDb instance.IOException - in case of I/O error.IllegalArgumentException - if the builder settings were incompleteIllegalStateException - if the thread was interrupted in pool usagepublic void doimport()
throws IOExceptionsetExternalPath(String) or setImporter(DataImporter).It can be used when it's not need to keep a reference to the rrd.
IOException - in case of I/O error.IllegalArgumentException - if the builder settings were incompleteIllegalStateException - if the thread was interrupted in pool usagepublic RrdDb.Builder readOnly()
public RrdDb.Builder setBackendFactory(RrdBackendFactory factory)
factory - The backend factory to use for that rrd.public RrdDb.Builder setExternalPath(String externalPath)
externalPath - an URI-like indication of RRD data to importpublic RrdDb.Builder setImporter(DataImporter importer)
importer - a custom importpublic RrdDb.Builder setPath(String path)
path - a String object.public RrdDb.Builder setPath(URI uri)
uri - a URI object.public RrdDb.Builder setPool(RrdDbPool pool)
pool - true if a pool is going to be usedRrdDb.Builder setPoolInternal(RrdDbPool pool)
pool -public RrdDb.Builder setReadOnly(boolean readOnly)
readOnly - true if the rrd is to be read onlypublic RrdDb.Builder setRrdDef(RrdDef rrdDef)
rrdDef - a RrdDef to a new rrd file.public RrdDb.Builder setRrdToolImporter(String externalPath) throws IOException
externalPath - the path to a RRDTool fileIOException - if the RRDTool file can‘t be readpublic RrdDb.Builder setUsePool(boolean usePool)
usePool - true if the pool should be usedpublic RrdDb.Builder usePool()
setPool(RrdDbPool),
the singleton instance will be used.