Package org.apache.hadoop.hbase.client
Class DelayingRunner
java.lang.Object
org.apache.hadoop.hbase.client.DelayingRunner
- All Implemented Interfaces:
Runnable
A wrapper for a runnable for a group of actions for a single regionserver.
This can be used to build up the actions that should be taken and then
This class exists to simulate using a ScheduledExecutorService with just a regular ExecutorService and Runnables. It is used for legacy reasons in the the client; this could only be removed if we change the expectations in HTable around the pool the client is able to pass in and even if we deprecate the current APIs would require keeping this class around for the interim to bridge between the legacy ExecutorServices and the scheduled pool.
-
Field Summary
Modifier and TypeFieldDescriptionprivate MultiAction
private static final org.slf4j.Logger
private Runnable
private final Object
private long
private boolean
-
Constructor Summary
-
Method Summary
-
Field Details
-
LOG
-
sleepLock
-
triggerWake
-
sleepTime
-
actions
-
runnable
-
-
Constructor Details
-
DelayingRunner
-
-
Method Details
-
setRunner
-
run
-
sleep
Sleep for an expected amount of time.This is nearly a copy of what the Sleeper does, but with the ability to know if you got interrupted while sleeping.
- Returns:
- true if the sleep completely entirely successfully, but otherwise false if the sleep was interrupted.
-
add
-
getActions
-
getSleepTime
-