|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jrobin.core.RrdBackendFactory
org.jrobin.core.RrdFileBackendFactory
org.jrobin.core.RrdNioBackendFactory
public class RrdNioBackendFactory
Factory class which creates actual RrdNioBackend
objects. This is the default factory since
1.4.0 version
Field Summary | |
---|---|
static int |
DEFAULT_SYNC_PERIOD
Period in seconds between consecutive synchronizations when sync-mode is set to SYNC_BACKGROUND. |
static java.lang.String |
NAME
factory name, "NIO" |
static int |
SYNC_AFTERFETCH
See setSyncMode(int) for explanation |
static int |
SYNC_AFTERUPDATE
See setSyncMode(int) for explanation |
static int |
SYNC_BACKGROUND
See setSyncMode(int) for explanation |
static int |
SYNC_BEFOREFETCH
See setSyncMode(int) for explanation |
static int |
SYNC_BEFOREUPDATE
See setSyncMode(int) for explanation |
static int |
SYNC_ONCLOSE
See setSyncMode(int) for explanation |
Constructor Summary | |
---|---|
RrdNioBackendFactory()
|
Method Summary | |
---|---|
java.lang.String |
getFactoryName()
Returns the name of this factory. |
static int |
getSyncMode()
Returns the current synchronization mode between backend data in memory and data in the persistent storage (disk file). |
static int |
getSyncPeriod()
Returns time between two consecutive background synchronizations. |
protected RrdBackend |
open(java.lang.String path,
boolean readOnly,
int lockMode)
Creates RrdNioBackend object for the given file path. |
static void |
setSyncMode(int syncMode)
Sets the current synchronization mode between backend data in memory (backend cache) and RRD data in the persistant storage (disk file). |
static void |
setSyncPeriod(int syncPeriod)
Sets time between consecutive background synchronizations. |
Methods inherited from class org.jrobin.core.RrdFileBackendFactory |
---|
exists |
Methods inherited from class org.jrobin.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 java.lang.String NAME
public static final int SYNC_ONCLOSE
setSyncMode(int)
for explanation
public static final int SYNC_BEFOREUPDATE
setSyncMode(int)
for explanation
public static final int SYNC_AFTERUPDATE
setSyncMode(int)
for explanation
public static final int SYNC_BEFOREFETCH
setSyncMode(int)
for explanation
public static final int SYNC_AFTERFETCH
setSyncMode(int)
for explanation
public static final int SYNC_BACKGROUND
setSyncMode(int)
for explanation
public static final int DEFAULT_SYNC_PERIOD
setSyncPeriod(int)
method.
Constructor Detail |
---|
public RrdNioBackendFactory()
Method Detail |
---|
public static int getSyncMode()
setSyncMode(int)
for full explanation of these return values.public static void setSyncMode(int syncMode)
syncMode
- Desired synchronization mode. Possible values are:
RrdDb.close()
is called (RRD file is closed) or when RrdDb.sync()
method is called.
Sample.update()
call (right before RRD file is about to be updated).
Sample.update()
call (right after RRD file is updated).
FetchRequest.fetchData()
call (right before data is about to be fetched from a RRD file,
for example for graph creation)
FetchRequest.fetchData()
call (right after data is fetched from a RRD file)
setSyncPeriod(int)
.
public static int getSyncPeriod()
setSyncPeriod(int)
method call, defaults to DEFAULT_SYNC_PERIOD
.
See setSyncPeriod(int)
for more information.
public static void setSyncPeriod(int syncPeriod)
syncPeriod
- Time in seconds between consecutive background synchronizations.protected RrdBackend open(java.lang.String path, boolean readOnly, int lockMode) throws java.io.IOException
open
in class RrdFileBackendFactory
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
.
java.io.IOException
- Thrown in case of I/O error.public java.lang.String getFactoryName()
getFactoryName
in class RrdFileBackendFactory
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |