org.jrobin.core
Class RrdFileBackendFactory
java.lang.Object
org.jrobin.core.RrdBackendFactory
org.jrobin.core.RrdFileBackendFactory
- Direct Known Subclasses:
- RrdNioBackendFactory
public class RrdFileBackendFactory
- extends RrdBackendFactory
Factory class which creates actual RrdFileBackend
objects. This was the default
backend factory in JRobin before 1.4.0 release.
Field Summary |
static java.lang.String |
NAME
factory name, "FILE" |
Method Summary |
protected boolean |
exists(java.lang.String path)
Method to determine if a file with the given path already exists. |
java.lang.String |
getFactoryName()
Returns the name of this factory. |
protected RrdBackend |
open(java.lang.String path,
boolean readOnly,
int lockMode)
Creates RrdFileBackend 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, "FILE"
- See Also:
- Constant Field Values
RrdFileBackendFactory
public RrdFileBackendFactory()
open
protected RrdBackend open(java.lang.String path,
boolean readOnly,
int lockMode)
throws java.io.IOException
- Creates RrdFileBackend object for the given file path.
- Specified by:
open
in class RrdBackendFactory
- Parameters:
path
- File pathreadOnly
- True, if the file should be accessed in read/only mode.
False otherwise.lockMode
- One of the following constants: RrdDb.NO_LOCKS
,
RrdDb.EXCEPTION_IF_LOCKED
or RrdDb.WAIT_IF_LOCKED
.
- Returns:
- RrdFileBackend object which handles all I/O operations for the given file path
- Throws:
java.io.IOException
- Thrown in case of I/O error.
exists
protected boolean exists(java.lang.String path)
- Method to determine if a file with the given path already exists.
- Specified by:
exists
in class RrdBackendFactory
- Parameters:
path
- File path
- Returns:
- True, if such file exists, false otherwise.
getFactoryName
public java.lang.String getFactoryName()
- Returns the name of this factory.
- Specified by:
getFactoryName
in class RrdBackendFactory
- Returns:
- Factory name (equals to string "FILE")