|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rrd4j.core.RrdBackendFactory org.rrd4j.core.RrdMongoDBBackendFactory
public class RrdMongoDBBackendFactory
RrdBackendFactory
that uses MongoDB for data storage. Construct a
MongoDB DBCollection
and pass it via the constructor.
Constructor Summary | |
---|---|
RrdMongoDBBackendFactory(com.mongodb.DBCollection rrdCollection)
Creates a RrdMongoDBBackendFactory. |
Method Summary | |
---|---|
protected boolean |
exists(String path)
Determines if a storage with the given path already exists. |
String |
getName()
Returns the name (primary ID) for the factory. |
protected RrdBackend |
open(String path,
boolean readOnly)
Creates RrdBackend object for the given storage path. |
protected boolean |
shouldValidateHeader(String path)
Determines if the header should be validated. |
Methods inherited from class org.rrd4j.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 |
Constructor Detail |
---|
public RrdMongoDBBackendFactory(com.mongodb.DBCollection rrdCollection)
DBCollection
has a safe write
concern, is capped (if needed) and slaveOk() called if applicable.
rrdCollection
- the collection to use for storing RRD byte dataMethod Detail |
---|
protected RrdBackend open(String path, boolean readOnly) throws IOException
RrdBackendFactory
open
in class RrdBackendFactory
path
- Storage pathreadOnly
- True, if the storage should be accessed in read/only mode.
False otherwise.
IOException
- Thrown in case of I/O error.protected boolean exists(String path) throws IOException
RrdBackendFactory
exists
in class RrdBackendFactory
path
- Storage path
IOException
protected boolean shouldValidateHeader(String path) throws IOException
RrdBackendFactory
shouldValidateHeader
in class RrdBackendFactory
path
- Storage path
IOException
- if header validation failspublic String getName()
RrdBackendFactory
getName
in class RrdBackendFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |