public class RrdMemoryBackendFactory extends RrdBackendFactory
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.
Modifier and Type | Field and Description |
---|---|
static String |
NAME
factory name, "MEMORY"
|
Constructor and Description |
---|
RrdMemoryBackendFactory() |
Modifier and Type | Method and Description |
---|---|
boolean |
delete(String id)
Removes the storage with the given ID from the memory.
|
protected boolean |
exists(String id)
Method to determine if a memory storage with the given ID already exists.
|
String |
getFactoryName()
Returns the name of this factory.
|
protected RrdBackend |
open(String id,
boolean readOnly)
Creates RrdMemoryBackend object.
|
getDefaultFactory, getFactory, isInstanceCreated, registerAndSetAsDefaultFactory, registerFactory, setDefaultFactory, toString
public static final String NAME
protected RrdBackend open(String id, boolean readOnly)
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 ignoredprotected boolean exists(String id)
exists
in class RrdBackendFactory
id
- Memory storage ID.public boolean delete(String id)
id
- Storage IDpublic String getFactoryName()
getFactoryName
in class RrdBackendFactory