|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jrobin.core.RrdOpener
public class RrdOpener
Class that represents an object that can be used to perform the actual
opening and closing of RRD files, using different methods. Other objects
like the FetchSourceList representing the Graph datasources
(FetchSourceList
) use a RrdOpener to retrieve the RrdDb instances of
RRD datasources.
Overriding the RrdOpener class allows finetuned access on the level of RrdDb retrieval and release. An child class could for example add log or debug statements, gather statistics on RRD access, or provide a transparent way to to access RRD datasources in an alternative way like through a DBMS.
Field Summary | |
---|---|
protected RrdDbPool |
pool
|
protected boolean |
readOnly
|
protected boolean |
usePool
|
Constructor Summary | |
---|---|
RrdOpener(boolean usePool)
Creates a new RrdOpener that will open RrdDb objects with read/write access. |
|
RrdOpener(boolean usePool,
boolean readOnly)
Creates a new RrdOpener that will open RrdDb objects with read/write or read-only access, depending on the readOnly flag.. |
Method Summary | |
---|---|
RrdDb |
getRrd(java.lang.String rrdFile,
RrdBackendFactory backendFactory)
Retrieves the RrdDb instance matching a specific RRD datasource name (usually a file name) and using a specified RrdBackendFactory. |
void |
releaseRrd(RrdDb rrdDb)
Releases an RrdDb instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected RrdDbPool pool
protected boolean readOnly
protected boolean usePool
Constructor Detail |
---|
public RrdOpener(boolean usePool)
usePool
- True if the RrdOpener should use the RrdDbPool.public RrdOpener(boolean usePool, boolean readOnly)
usePool
- True if the RrdOpener should use the RrdDbPool.readOnly
- True if the RrdOpener should open RrdDb objects as read-only.Method Detail |
---|
public RrdDb getRrd(java.lang.String rrdFile, RrdBackendFactory backendFactory) throws java.io.IOException, RrdException
rrdFile
- Name of the RRD datasource.backendFactory
- BackendFactory to use for retrieval.
java.io.IOException
- Thrown in case of I/O error.
RrdException
- Thrown in case of a JRobin specific error.public void releaseRrd(RrdDb rrdDb) throws java.io.IOException, RrdException
rrdDb
- RrdDb object that should be released.
java.io.IOException
- Thrown in case of I/O error.
RrdException
- Thrown in case of a JRobin specific error.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |