All times and time units are in nanoseconds
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final AtomicLong | |
| private static final int | |
| private static final long | |
| private static final long | |
| private static final boolean | |
| private final SimplePauseDetector. | |
| private final long | |
| private final long | |
| private volatile long | |
| private volatile long | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | SimplePauseDetector(long
sleep interval used by detector threads sleepInterval, long minimum threshold for reporting detected pauses pauseNotificationThreshold, int number of consensus detector threads to use numberOfDetectorThreads)Creates a SimplePauseDetector |
| public | SimplePauseDetector(long
sleep interval used by detector threads sleepInterval, long minimum threshold for reporting detected pauses pauseNotificationThreshold, int number of consensus detector threads to use numberOfDetectorThreads, boolean provide verbose output when pauses are detected verbose)Creates a SimplePauseDetector |
| public | SimplePauseDetector()
Creates a SimplePauseDetector with a default sleep interval (1 msec), a default pause notification threshold (1 msec), and using the default number of consensus detection threads (3). |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | shutdown()
Overrides org. |
| public void | skipConsensusTimeTo(long
time to skip to newConsensusTime)A test method that allows the caller to artificially move the consensus observed time forward without causing a pause to be detected as a result of the time skip. |
| public void | stallDetectorThreads(long
a mask designating which threads should be stalled. threadNumberMask, long stall length, in nanosecond units stallLength)A test method that allows the caller to artificially stall a requested set of the detector threads for a given amount of time. |
| consensusLatestTime | back to summary |
|---|---|
| pack-priv final AtomicLong consensusLatestTime | |
| DEFAULT_NumberOfDetectorThreads | back to summary |
|---|---|
| private static final int DEFAULT_NumberOfDetectorThreads | |
| DEFAULT_PauseNotificationThreshold | back to summary |
|---|---|
| private static final long DEFAULT_PauseNotificationThreshold | |
| DEFAULT_SleepInterval | back to summary |
|---|---|
| private static final long DEFAULT_SleepInterval | |
| DEFAULT_Verbose | back to summary |
|---|---|
| private static final boolean DEFAULT_Verbose | |
| detectors | back to summary |
|---|---|
| private final SimplePauseDetector. | |
| pauseNotificationThreshold | back to summary |
|---|---|
| private final long pauseNotificationThreshold | |
| sleepInterval | back to summary |
|---|---|
| private final long sleepInterval | |
| stallThreadMask | back to summary |
|---|---|
| private volatile long stallThreadMask | |
| stopThreadMask | back to summary |
|---|---|
| private volatile long stopThreadMask | |
| verbose | back to summary |
|---|---|
| private boolean verbose | |
| SimplePauseDetector | back to summary |
|---|---|
| public SimplePauseDetector(long sleepInterval, long pauseNotificationThreshold, int numberOfDetectorThreads) Creates a SimplePauseDetector
| |
| SimplePauseDetector | back to summary |
|---|---|
| public SimplePauseDetector(long sleepInterval, long pauseNotificationThreshold, int numberOfDetectorThreads, boolean verbose) Creates a SimplePauseDetector
| |
| SimplePauseDetector | back to summary |
|---|---|
| public SimplePauseDetector() Creates a SimplePauseDetector with a default sleep interval (1 msec), a default pause notification threshold (1 msec), and using the default number of consensus detection threads (3). | |
| setVerbose | back to summary |
|---|---|
| public void setVerbose(boolean verbose) | |
| shutdown | back to summary |
|---|---|
| public void shutdown() Overrides org. Shut down the pause detector operation and terminate it's threads.
| |
| skipConsensusTimeTo | back to summary |
|---|---|
| public void skipConsensusTimeTo(long newConsensusTime) A test method that allows the caller to artificially move the consensus observed time forward without causing a pause to be detected as a result of the time skip. Useful for test programs that wish to use artificial time services.
| |
| stallDetectorThreads | back to summary |
|---|---|
| public void stallDetectorThreads(long threadNumberMask, long stallLength) throws InterruptedException A test method that allows the caller to artificially stall a requested set of the detector threads for a given amount of time. Used to verify pause detection when consensus occurs, as well as lack of detection when it does not.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile long | |
| pack-priv final long | |
| pack-priv final int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | run()
Overrides java. Implements java. |
| observedLasUpdateTime | back to summary |
|---|---|
| pack-priv volatile long observedLasUpdateTime | |
| threadMask | back to summary |
|---|---|
| pack-priv final long threadMask | |
| threadNumber | back to summary |
|---|---|
| pack-priv final int threadNumber | |
| SimplePauseDetectorThread | back to summary |
|---|---|
| pack-priv SimplePauseDetectorThread(final int threadNumber) | |
| run | back to summary |
|---|---|
| public void run() Overrides java. Implements java. Doc from java. This method is run by the thread when it executes. Subclasses of This method is not intended to be invoked directly. If this thread is a
platform thread created with a | |