|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.util.Base
com.tangosol.net.GuardSupport
public class GuardSupport
A concrete implementation of Guardian/Guardable interactions. GuardSupport is used by a Guardian to manage its responsibilities.
| Nested Class Summary | |
|---|---|
protected class |
GuardSupport.ContextBase implementation for GuardContext's used by GuardSupport. |
| Field Summary | |
|---|---|
protected static long |
GUARDIAN_EARLY_THRESHOLDThe threshold before which than which a guardian considers itself early in checking its guardables. |
protected static long |
GUARDIAN_LATE_THRESHOLDThe threshold past which a guardian considers itself late in checking its guardables. |
protected static long |
GUARDIAN_LOG_INTERVALThe minimum interval at which the Guardian should log thread dumps. |
static long |
GUARDIAN_MAX_CHECK_INTERVALThe maximum interval at which the Guardian thread should call check() to verify its guardables. |
protected GuardSupport.Context[] |
m_aGuardContextArray of GuardContexts for the registered Guardables. |
protected int |
m_cGuardableThe number of registered Guardables. |
protected Guardian |
m_guardianThe Guardian that is managing this GuardSupport. |
protected long |
m_ldtNextCheckThe next time at which the Guardables should be checked. |
protected static java.lang.ThreadLocal |
m_tlContextThreadLocal containing the GuardContext associated with the current thread. |
protected static java.util.concurrent.atomic.AtomicLong |
s_atomicLogTimeAtomic counter containing the last log time stamp. |
protected static java.lang.management.ThreadMXBean |
s_beanThreadMXBean for the thread system |
| Constructor Summary | |
|---|---|
GuardSupport(Guardian guardian)Construct a GuardSupport for the specified Guardian. |
|
| Method Summary | |
|---|---|
Guardian.GuardContext |
add(Guardable guardable, long cMillis, float flPctRecover)Add the specified guardable to the set of Guardables managed by this manager, subject to the specified service parameters. |
long |
check()Check the registered Guardable objects for timeout, taking appropriate action and calculate the timestamp when the next check should be performed. |
protected static java.util.Set |
collectDeadlockedIds()Collect the deadlocked thread ids. |
static void |
collectLockedSyncs(java.lang.management.ThreadInfo infoThread, java.lang.StringBuilder sbTrace)Collect locked synchronizers for a given thread. |
static void |
collectStackTrace(java.lang.management.ThreadInfo infoThread, java.lang.StringBuilder sbTrace)Collect stack trace for a given thread. |
static void |
collectThreadHeader(java.lang.management.ThreadInfo infoThread, java.lang.StringBuilder sbTrace, boolean fDeadlocked)Collect the header information for a given thread. |
int |
getGuardableCount()Return the number of Guardables that are registered with this GuardSupport. |
protected GuardSupport.Context[] |
getGuardContexts()Return the array of GuardContext objects for the Guardables managed by this GuardSupport. |
protected Guardian |
getGuardian()Return the Guardian that manages this GuardSupport. |
long |
getNextCheckTime()Return the next time at which the Guardables should be checked. |
static Guardian.GuardContext |
getThreadContext()Obtain the GuardContext associated with the current thread. |
static java.lang.String |
getThreadDump()Get the full thread dump. |
static void |
heartbeat()Issue a heartbeat on the GuardContext associated with the current thread. |
static void |
heartbeat(long cMillis)Issue a heartbeat of the specified duration on the GuardContext associated with the current thread. |
protected GuardSupport.Context |
instantiateContext(Guardable guardable, long cMillis, float flPctRecover) |
static void |
logStackTraces()Collect stack traces and synchronization information for all running threads and write them to the error log. |
void |
release()Release the Guardables managed by this GuardSupport. |
void |
remove(Guardable guardable)Remove the specified Guardable from the set of Guardables managed by this manager. |
protected void |
setGuardableCount(int cGuardable)Set the number of Guardables that are registered with this GuardSupport. |
protected void |
setGuardContexts(GuardSupport.Context[] aGuardContext)Set the array of GuardContext objects for the Guardables that are managed by this GuardSupport. |
protected void |
setNextCheckTime(long ldtNextCheck)Set the next time at which the Guardables should be checked. |
static void |
setThreadContext(Guardian.GuardContext context)Associate the specified GuardContext with the current thread. |
| Field Detail |
|---|
public static final long GUARDIAN_MAX_CHECK_INTERVAL
protected static final long GUARDIAN_LATE_THRESHOLD
protected static final long GUARDIAN_EARLY_THRESHOLD
protected static final long GUARDIAN_LOG_INTERVAL
protected GuardSupport.Context[] m_aGuardContext
protected int m_cGuardable
protected Guardian m_guardian
protected long m_ldtNextCheck
protected static java.lang.ThreadLocal m_tlContext
protected static java.util.concurrent.atomic.AtomicLong s_atomicLogTime
protected static java.lang.management.ThreadMXBean s_beanThread
| Constructor Detail |
|---|
public GuardSupport(Guardian guardian)
guardian - the guardian managing this GuardSupport| Method Detail |
|---|
protected GuardSupport.Context[] getGuardContexts()
protected void setGuardContexts(GuardSupport.Context[] aGuardContext)
aGuardContext - the array of managed GuardContext objectsprotected Guardian getGuardian()
public long getNextCheckTime()
protected void setNextCheckTime(long ldtNextCheck)
ldtNextCheck - the next time at which the Guardables should be checked
public Guardian.GuardContext add(Guardable guardable,
long cMillis,
float flPctRecover)
guardable - the Guardable object to be managedcMillis - the timeout for the specified GuardableflPctRecover - the percentage of the timeout after which to attempt recovery of the Guardable; 0 < flPctRecover <eq; 1.0public void remove(Guardable guardable)
guardable - the guardable to removepublic int getGuardableCount()
protected void setGuardableCount(int cGuardable)
cGuardable - the number of registered Guardable objectspublic long check()
getNextCheckTime() method.public void release()
protected GuardSupport.Context instantiateContext(Guardable guardable,
long cMillis,
float flPctRecover)
guardable - the Guardable object to be managedcMillis - the timeout for the specified GuardableflPctRecover - the percentage of the timeout after which to attempt recovery of the Guardable; 0 < flPctRecover <eq; 1.0public static Guardian.GuardContext getThreadContext()
public static void setThreadContext(Guardian.GuardContext context)
context - the GuardContext to associate with the current threadpublic static void heartbeat()
public static void heartbeat(long cMillis)
cMillis - the number of milliseconds to heartbeat forpublic static void logStackTraces()
public static java.lang.String getThreadDump()
public static void collectThreadHeader(java.lang.management.ThreadInfo infoThread,
java.lang.StringBuilder sbTrace,
boolean fDeadlocked)
infoThread - the ThreadInfo that the thread is associated withsbTrace - the StringBuilder to append the info tofDeadlocked - true iff the thread is in deadlock
public static void collectLockedSyncs(java.lang.management.ThreadInfo infoThread,
java.lang.StringBuilder sbTrace)
infoThread - the ThreadInfo that the thread is associated withsbTrace - the StringBuilder to append the info to
public static void collectStackTrace(java.lang.management.ThreadInfo infoThread,
java.lang.StringBuilder sbTrace)
infoThread - the ThreadInfo that the thread is associated withsbTrace - the StringBuilder to append the info toprotected static java.util.Set collectDeadlockedIds()
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||