org.jrobin.core
public class RrdSafeFileBackendFactory extends RrdFileBackendFactory
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. |
static String | NAME
factory name, "SAFE" |
Method Summary | |
---|---|
String | getFactoryName()
Returns the name of this factory.
|
static long | getLockRetryPeriod()
Returns time between two consecutive file locking attempts.
|
static long | getLockWaitTime()
Returns time this backend will wait for a file lock.
|
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.
|
Returns: Factory name (equals to string "SAFE")
Returns: Time (im milliseconds) between two consecutive file locking attempts.
Returns: Time (in milliseconds) this backend will wait for a file lock.
Parameters: path File path readOnly This parameter is ignored
Returns: RrdSafeFileBackend object which handles all I/O operations for the given file path
Throws: IOException Thrown in case of I/O error.
Parameters: lockRetryPeriod time (in milliseconds) between two consecutive file locking attempts.
Parameters: lockWaitTime Maximum lock wait time (in milliseconds)