@RrdBackendAnnotation(name="MEMORY", shouldValidateHeader=false) public class RrdMemoryBackendFactory extends RrdBackendFactory
RrdMemoryBackend objects. Rrd4j'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 |
|---|---|
protected Map<String,AtomicReference<ByteBuffer>> |
backends |
cachingAllowed, DEFAULTFACTORY, name, scheme, validateHeader| Constructor and Description |
|---|
RrdMemoryBackendFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canStore(URI uri) |
boolean |
delete(String id)
Removes the storage with the given ID from the memory.
|
protected boolean |
exists(String id)
Determines if a storage with the given path already exists.
|
protected RrdBackend |
open(String id,
boolean readOnly) |
addActiveFactories, buildGenericUri, checkClosing, close, exists, findFactory, getActiveFactories, getBackend, getBackend, getCanonicalUri, getDefaultFactory, getName, getPath, getRootUri, getScheme, getUri, resolve, setActiveFactories, shouldValidateHeader, shouldValidateHeaderprotected final Map<String,AtomicReference<ByteBuffer>> backends
public boolean canStore(URI uri)
canStore in class RrdBackendFactorypublic boolean delete(String id)
id - Storage IDprotected boolean exists(String id)
Method to determine if a memory storage with the given ID already exists.
exists in class RrdBackendFactoryid - Storage pathprotected RrdBackend open(String id, boolean readOnly)
Creates RrdMemoryBackend object.
open in class RrdBackendFactory