public class RrdSafeFileBackendFactory extends RrdRandomAccessFileBackendFactory
RrdSafeFileBackend
objects.Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
RrdSafeFileBackendFactory() |
Modifier and Type | Method and Description |
---|---|
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()
getName.
|
protected RrdBackend |
open(String path,
boolean readOnly)
Creates RrdBackend object for the given storage 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.
|
exists, shouldValidateHeader
getDefaultFactory, getFactory, registerAndSetAsDefaultFactory, registerFactory, setDefaultFactory
public static final long LOCK_WAIT_TIME
public static final long LOCK_RETRY_PERIOD
protected RrdBackend open(String path, boolean readOnly) throws IOException
open
in class RrdRandomAccessFileBackendFactory
path
- Storage pathreadOnly
- True, if the storage should be accessed in read/only mode.
False otherwise.IOException
- Thrown in case of I/O error.public String getName()
getName.
getName
in class RrdRandomAccessFileBackendFactory
String
"SAFE".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.Copyright © 2015. All rights reserved.