gr.uoa.di.madgik.grs.registry
Class LifecycleManager
java.lang.Object
java.lang.Thread
gr.uoa.di.madgik.grs.registry.LifecycleManager
- All Implemented Interfaces:
- Runnable
public class LifecycleManager
- extends Thread
The LifecycleManager is a utility class that monitors the items registered with the GRSRegistry
and makes sure that they are properly purged when their lifecycle properties dictates their disposal. The property
that is taken into account in this decision is the last activity time of each entry. Whenever its inactivity
time has extended over the timeout set for each one, the item is disposed. The timeout that is taken into account
for IBuffers, is IBuffer.getInactivityTimeout() and IBuffer.getInactivityTimeUnit(). For
IBufferStores, is IBufferStore.getInactivityTimeout() and IBufferStore.getInactivityTimeUnit().
The check is performed with a dynamically defined period. Initially this period is set to
DefaultCheckPeriod. During each iteration, the minimum of the non to be disposed remaining lifetime
is selected for both IBuffer and IBufferStore entries. At every subsequent iteration, this period is recomputed
to avoid unnecessary checks
- Author:
- gpapanikos
|
Method Summary |
void |
run()
|
| 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 |
DefaultCheckPeriod
public static final long DefaultCheckPeriod
- The default check period. Currently set to 2 minutes
- See Also:
- Constant Field Values
LifecycleManager
public LifecycleManager()
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
Copyright © 2012. All Rights Reserved.