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 if
usePool is true. |
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 incompletepublic 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 incompletepublic 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()
public RrdDb.Builder setPool(RrdDbPool pool)
usePool
is true. If not defined,
the singleton instance will be used.pool
- true if a pool is going to be usedpublic 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.