def doWork(): Unit
ShutdownableThread
ShutdownableThread
is the contract for non-daemon threads of execution.
ShutdownableThread
contract expects that the objects implement doWork method.
run
Method
run(): Unit
Note
|
run is a part of java.lang.Runnable that is executed when the thread is started.
|
run
first prints out the following INFO message to the logs:
Starting
In the end, run
decrements the count of shutdownLatch and prints out the following INFO message to the logs:
Stopped
Pausing (Until Shutdown or Timeout) — pause
Method
pause(
timeout: Long,
unit: TimeUnit): Unit
pause
…FIXME
Note
|
pause is used when…FIXME
|
initiateShutdown
Method
initiateShutdown(): Boolean
initiateShutdown
…FIXME
Note
|
initiateShutdown is used when…FIXME
|
Internal Properties
Name | Description |
---|---|
|
Flag that controls how long to execute run method. |
|
Java’s java.util.concurrentCountDownLatch with the number of passes being |