Package org.jrobin.core
Class RrdJRobin14FileBackendFactory
- java.lang.Object
-
- org.jrobin.core.RrdBackendFactory
-
- org.jrobin.core.RrdJRobin14FileBackendFactory
-
public class RrdJRobin14FileBackendFactory extends RrdBackendFactory
Factory class which creates actualRrdFileBackend
objects. This was the default backend factory in JRobin before 1.4.0 release.
-
-
Constructor Summary
Constructors Constructor Description RrdJRobin14FileBackendFactory()
RrdJRobin14FileBackendFactory(RrdJRobin14FileBackend.LockMode lockMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
exists(String path)
Method to determine if a file with the given path already exists.String
getFactoryName()
Returns the name of this factory.protected RrdBackend
open(String path, boolean readOnly)
Creates RrdFileBackend object for the given file path.String
toString()
-
Methods inherited from class org.jrobin.core.RrdBackendFactory
getDefaultFactory, getFactory, isInstanceCreated, registerAndSetAsDefaultFactory, registerFactory, setDefaultFactory
-
-
-
-
Field Detail
-
NAME
public static final String NAME
factory name, "FILE"- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RrdJRobin14FileBackendFactory
public RrdJRobin14FileBackendFactory()
-
RrdJRobin14FileBackendFactory
public RrdJRobin14FileBackendFactory(RrdJRobin14FileBackend.LockMode lockMode)
-
-
Method Detail
-
open
protected RrdBackend open(String path, boolean readOnly) throws IOException
Creates RrdFileBackend object for the given file path.- Specified by:
open
in classRrdBackendFactory
- Parameters:
path
- File pathreadOnly
- True, if the file should be accessed in read/only mode. False otherwise.- Returns:
- RrdFileBackend object which handles all I/O operations for the given file path
- Throws:
IOException
- Thrown in case of I/O error.
-
exists
protected boolean exists(String path)
Method to determine if a file with the given path already exists.- Specified by:
exists
in classRrdBackendFactory
- Parameters:
path
- File path- Returns:
- True, if such file exists, false otherwise.
-
getFactoryName
public String getFactoryName()
Returns the name of this factory.- Specified by:
getFactoryName
in classRrdBackendFactory
- Returns:
- Factory name (equals to string "FILE")
-
toString
public String toString()
- Overrides:
toString
in classRrdBackendFactory
-
-