|
||||||||||
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.RrdFileBackendFactory org.rrd4j.core.RrdRandomAccessFileBackendFactory org.rrd4j.core.RrdSafeFileBackendFactory
public class RrdSafeFileBackendFactory
Factory class which creates actual RrdSafeFileBackend
objects.
Field Summary | |
---|---|
static long |
LOCK_RETRY_PERIOD
Default time between two consecutive file locking attempts. |
static long |
LOCK_WAIT_TIME
Default time (in milliseconds) this backend will wait for a file lock. |
Constructor Summary | |
---|---|
RrdSafeFileBackendFactory()
|
Method Summary | |
---|---|
static long |
getLockRetryPeriod()
Returns time between two consecutive file locking attempts. |
static long |
getLockWaitTime()
Returns time this backend will wait for a file lock. |
String |
getName()
Returns the name (primary ID) for the factory. |
protected RrdBackend |
open(String path,
boolean readOnly)
Creates RrdSafeFileBackend object for the given file path. |
static void |
setLockRetryPeriod(long lockRetryPeriod)
Sets time between two consecutive file locking attempts. |
static void |
setLockWaitTime(long lockWaitTime)
Sets time this backend will wait for a file lock. |
Methods inherited from class org.rrd4j.core.RrdRandomAccessFileBackendFactory |
---|
exists, shouldValidateHeader |
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 |
Field Detail |
---|
public static final long LOCK_WAIT_TIME
public static final long LOCK_RETRY_PERIOD
Constructor Detail |
---|
public RrdSafeFileBackendFactory()
Method Detail |
---|
protected RrdBackend open(String path, boolean readOnly) throws IOException
open
in class RrdRandomAccessFileBackendFactory
path
- File pathreadOnly
- This parameter is ignored
IOException
- Thrown in case of I/O error.public String getName()
RrdBackendFactory
getName
in class RrdRandomAccessFileBackendFactory
public static long getLockWaitTime()
public static void setLockWaitTime(long lockWaitTime)
lockWaitTime
- Maximum lock wait time (in milliseconds)public static long getLockRetryPeriod()
public static void setLockRetryPeriod(long lockRetryPeriod)
lockRetryPeriod
- time (in milliseconds) between two consecutive file locking attempts.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |