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) |
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) |
RrdDb.Builder |
setPath(URI uri) |
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) |
RrdDb.Builder |
setRrdDef(RrdDef rrdDef) |
RrdDb.Builder |
setRrdToolImporter(String externalPath)
Set when the builder will be used to import a RRDTool file.
|
RrdDb.Builder |
setUsePool(boolean usePool) |
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 IOException
setExternalPath(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 setPath(String path)
public RrdDb.Builder setPath(URI uri)
public RrdDb.Builder setBackendFactory(RrdBackendFactory factory)
factory
- The backend factory to use for that rrd.public RrdDb.Builder setReadOnly(boolean readOnly)
readOnly
- true if the rrd is to be read onlypublic RrdDb.Builder readOnly()
public RrdDb.Builder setUsePool(boolean usePool)
public RrdDb.Builder usePool()
setPool(RrdDbPool)
, the singleton instance will be used.public RrdDb.Builder setPool(RrdDbPool pool)
pool
- true if a pool is going to be usedRrdDb.Builder setPoolInternal(RrdDbPool pool)
pool
- 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 setRrdToolImporter(String externalPath) throws IOException
externalPath
- the path to a RRDTool fileIOException
- if the RRDTool file can‘t be readpublic RrdDb.Builder setRrdDef(RrdDef rrdDef)
rrdDef
- a RrdDef
to a new rrd file.