Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected String |
dataBaseFile |
protected HashMap<String,String> |
dataSources |
protected org.apache.log4j.Logger |
logger |
protected int |
step |
protected boolean |
terminate |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier | Constructor and Description |
---|---|
|
RRDDataStore(StandardMBean mbean,
String dataBaseFilePath,
int step,
org.apache.log4j.Logger logger)
Initializes a new RRD data base if it's not exist.
|
protected |
RRDDataStore(String dataBaseFilePath,
int step,
org.apache.log4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Converts the data base into the bytes array in order to send it to a client.
|
protected void |
initDatabase() |
void |
run()
Periodically dumps the new mbean state to the data base
|
void |
terminate()
Terminates the thread activity.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected int step
protected String dataBaseFile
protected volatile boolean terminate
protected org.apache.log4j.Logger logger
protected RRDDataStore(String dataBaseFilePath, int step, org.apache.log4j.Logger logger)
public RRDDataStore(StandardMBean mbean, String dataBaseFilePath, int step, org.apache.log4j.Logger logger) throws IOException
mbean
- is the source of chronological datadataBaseFilePath
- is the path to the file with the rrd data basestep
- is the data base refresh periodIOException
- is thrown when the data base exists but cannot be readprotected void initDatabase() throws IOException
IOException
public void run()
public byte[] getBytes() throws IOException
IOException
- when file cannot be readpublic void terminate()