|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rrd4j.core.RrdDbPool
org.rrd4j.core.RrdDbPoolNew
public class RrdDbPoolNew
Field Summary |
---|
Fields inherited from class org.rrd4j.core.RrdDbPool |
---|
INITIAL_CAPACITY |
Constructor Summary | |
---|---|
protected |
RrdDbPoolNew()
|
Method Summary | |
---|---|
int |
getCapacity()
Returns the maximum number of simultaneously open RRD files. |
int |
getOpenCount(RrdDb rrdDb)
Returns the number of usage for a RRD. |
int |
getOpenCount(String path)
Returns the number of usage for a RRD. |
int |
getOpenFileCount()
Returns the number of open RRD files. |
String[] |
getOpenFiles()
Returns an array of open file names. |
void |
release(RrdDb rrdDb)
Releases RrdDb reference previously obtained from the pool. |
RrdDb |
requestRrdDb(RrdDef rrdDef)
Requests a RrdDb reference for the given RRD file definition object. |
RrdDb |
requestRrdDb(String path)
Requests a RrdDb reference for the given RRD file path. |
RrdDb |
requestRrdDb(String path,
String sourcePath)
Requests a RrdDb reference for the given path. |
void |
setCapacity(int newCapacity)
Sets the maximum number of simultaneously open RRD files. |
Methods inherited from class org.rrd4j.core.RrdDbPool |
---|
getInstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected RrdDbPoolNew()
Method Detail |
---|
public int getOpenFileCount()
RrdDbPool
getOpenFileCount
in class RrdDbPool
public String[] getOpenFiles()
RrdDbPool
getOpenFiles
in class RrdDbPool
public void release(RrdDb rrdDb) throws IOException
RrdDbPool
release
in class RrdDbPool
rrdDb
- RrdDb reference to be returned to the pool
IOException
- Thrown in case of I/O errorpublic RrdDb requestRrdDb(String path) throws IOException
RrdDbPool
RrdDbPool.INITIAL_CAPACITY
, the file will be open and a new RrdDb reference will be returned.
If the file is not already open and the number of already open RRD files is equal to
RrdDbPool.INITIAL_CAPACITY
, the method blocks until some RRD file is closed.
requestRrdDb
in class RrdDbPool
path
- Path to existing RRD file
IOException
- Thrown in case of I/O errorpublic RrdDb requestRrdDb(RrdDef rrdDef) throws IOException
RrdDbPool
RrdDbPool.INITIAL_CAPACITY
, a new RRD file will be created and a its RrdDb reference will be returned.
If the file is not already open and the number of already open RRD files is equal to
RrdDbPool.INITIAL_CAPACITY
, the method blocks until some RRD file is closed.
requestRrdDb
in class RrdDbPool
rrdDef
- Definition of the RRD file to be created
IOException
- Thrown in case of I/O errorpublic RrdDb requestRrdDb(String path, String sourcePath) throws IOException
RrdDbPool
RrdDbPool.INITIAL_CAPACITY
, a new RRD file will be created and a its RrdDb reference will be returned.
If the file is not already open and the number of already open RRD files is equal to
RrdDbPool.INITIAL_CAPACITY
, the method blocks until some RRD file is closed.
requestRrdDb
in class RrdDbPool
path
- Path to RRD file which should be createdsourcePath
- Path to external data which is to be converted to Rrd4j's native RRD file format
IOException
- Thrown in case of I/O errorpublic void setCapacity(int newCapacity)
RrdDbPool
setCapacity
in class RrdDbPool
newCapacity
- Maximum number of simultaneously open RRD files.public int getCapacity()
RrdDbPool
getCapacity
in class RrdDbPool
public int getOpenCount(RrdDb rrdDb) throws IOException
RrdDbPool
getOpenCount
in class RrdDbPool
rrdDb
- RrdDb reference for which informations is needed.
IOException
public int getOpenCount(String path) throws IOException
RrdDbPool
getOpenCount
in class RrdDbPool
path
- RRD file for which informations is needed.
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |