org.jrobin.core
Class RrdSafeFileBackendFactory
java.lang.Object
org.jrobin.core.RrdBackendFactory
org.jrobin.core.RrdFileBackendFactory
org.jrobin.core.RrdSafeFileBackendFactory
public class RrdSafeFileBackendFactory
- extends RrdFileBackendFactory
Factory class which creates actual RrdSafeFileBackend
objects.
Field Summary |
static java.lang.String |
NAME
factory name, "SAFE" |
Method Summary |
java.lang.String |
getFactoryName()
Returns the name of this factory. |
protected RrdBackend |
open(java.lang.String path,
boolean readOnly,
int lockMode)
Creates RrdSafeFileBackend object for the given file path. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
public static final java.lang.String NAME
- factory name, "SAFE"
- See Also:
- Constant Field Values
RrdSafeFileBackendFactory
public RrdSafeFileBackendFactory()
open
protected RrdBackend open(java.lang.String path,
boolean readOnly,
int lockMode)
throws java.io.IOException
- Creates RrdSafeFileBackend object for the given file path.
- Overrides:
open
in class RrdFileBackendFactory
- Parameters:
path
- File pathreadOnly
- True, if the file should be accessed in read/only mode.
False otherwise.lockMode
- This parameter is ignored since this backend implements its own
locking mechanism.
- Returns:
- RrdSafeFileBackend object which handles all I/O operations for the given file path
- Throws:
java.io.IOException
- Thrown in case of I/O error.
getFactoryName
public java.lang.String getFactoryName()
- Returns the name of this factory.
- Overrides:
getFactoryName
in class RrdFileBackendFactory
- Returns:
- Factory name (equals to string "SAFE")