public class RrdMongoDBBackendFactory extends RrdBackendFactory
RrdBackendFactory
that uses MongoDB for data storage. Construct a
MongoDB DBCollection
and pass it via the constructor.Constructor and Description |
---|
RrdMongoDBBackendFactory(DBCollection rrdCollection)
Creates a RrdMongoDBBackendFactory.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getDefaultFactory, getFactory, registerAndSetAsDefaultFactory, registerFactory, setDefaultFactory
public RrdMongoDBBackendFactory(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 dataprotected RrdBackend open(String path, boolean readOnly) throws IOException
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
exists
in class RrdBackendFactory
path
- Storage pathIOException
- if any.protected boolean shouldValidateHeader(String path) throws IOException
shouldValidateHeader
in class RrdBackendFactory
path
- Storage pathIOException
- if header validation failspublic String getName()
getName
in class RrdBackendFactory
Copyright © 2015. All rights reserved.