|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jrobin.core.RrdBackendFactory
org.jrobin.core.RrdMemoryBackendFactory
public class RrdMemoryBackendFactory
Factory class which creates actual RrdMemoryBackend
objects. JRobin's support
for in-memory RRDs is still experimental. You should know that all active RrdMemoryBackend
objects are held in memory, each backend object stores RRD data in one big byte array. This
implementation is therefore quite basic and memory hungry but runs very fast.
Calling close()
on RrdDb objects does not release any memory at all
(RRD data must be available for the next new RrdDb(path)
call. To release allocated
memory, you'll have to call delete(path)
method of this class.
Field Summary | |
---|---|
static java.lang.String |
NAME
factory name, "MEMORY" |
Constructor Summary | |
---|---|
RrdMemoryBackendFactory()
|
Method Summary | |
---|---|
boolean |
delete(java.lang.String id)
Removes the storage with the given ID from the memory. |
protected boolean |
exists(java.lang.String id)
Method to determine if a memory storage with the given ID already exists. |
java.lang.String |
getFactoryName()
Returns the name of this factory. |
protected RrdBackend |
open(java.lang.String id,
boolean readOnly,
int lockMode)
Creates RrdMemoryBackend object. |
Methods inherited from class org.jrobin.core.RrdBackendFactory |
---|
getDefaultFactory, getFactory, registerAndSetAsDefaultFactory, registerFactory, setDefaultFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NAME
Constructor Detail |
---|
public RrdMemoryBackendFactory()
Method Detail |
---|
protected RrdBackend open(java.lang.String id, boolean readOnly, int lockMode) throws java.io.IOException
open
in class RrdBackendFactory
id
- Since this backend holds all data in memory, this argument is interpreted
as an ID for this memory-based storage.readOnly
- This parameter is ignoredlockMode
- This parameter is ignored
java.io.IOException
- Thrown in case of I/O error.protected boolean exists(java.lang.String id)
exists
in class RrdBackendFactory
id
- Memory storage ID.
public boolean delete(java.lang.String id)
id
- Storage ID
public java.lang.String getFactoryName()
getFactoryName
in class RrdBackendFactory
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |