org.apache.geronimo.monitoring.snapshot
Class SnapshotThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.apache.geronimo.monitoring.snapshot.SnapshotThread
All Implemented Interfaces:
Runnable

public class SnapshotThread
extends Thread

Thread that is in charge of executing every x milliseconds. Upon each iteration, a snapshot of the server's information is recorded.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SnapshotThread(long snapshot_length, MBeanServer mbServer)
           
 
Method Summary
 void addMBeanForSnapshot(String mbeanName)
          Adds the mbean name to list in memory.
 long getSnapshotDuration()
          Gets the elapsed time in milliseconds between each snapshot.
 void removeMBeanForSnapshot(String mbeanName)
          Removes the mbean name to list in memory.
 void run()
           
 void setSnapshotDuration(long snapshot_length)
          Sets the elapsed time in milliseconds between each snapshot.
 Integer SnapshotStatus()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnapshotThread

public SnapshotThread(long snapshot_length,
                      MBeanServer mbServer)
Method Detail

getSnapshotDuration

public long getSnapshotDuration()
Gets the elapsed time in milliseconds between each snapshot.

Returns:
long

SnapshotStatus

public Integer SnapshotStatus()

addMBeanForSnapshot

public void addMBeanForSnapshot(String mbeanName)
Adds the mbean name to list in memory. To update the snapshot-config.xml coder must use SnapshotConfigXMLBuilder class.

Parameters:
mbeanName -

removeMBeanForSnapshot

public void removeMBeanForSnapshot(String mbeanName)
Removes the mbean name to list in memory. To update the snapshot-config.xml coder must use SnapshotConfigXMLBuilder class.

Parameters:
mbeanName -

setSnapshotDuration

public void setSnapshotDuration(long snapshot_length)
Sets the elapsed time in milliseconds between each snapshot.

Parameters:
snapshotDuration -

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.