Class DelayedUtil
java.lang.Object
org.apache.hadoop.hbase.procedure2.util.DelayedUtil
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Has a timeout.static class
static interface
Add a timeout to a Delay -
Field Summary
Modifier and TypeFieldDescriptionstatic final DelayedUtil.DelayedWithTimeout
POISON implementation; used to mark special state: e.g. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
compareDelayed
(Delayed o1, Delayed o2) static long
getRemainingTime
(TimeUnit resultUnit, long timeout) Returns Time remaining as milliseconds.private static long
static <E extends Delayed>
EtakeWithoutInterrupt
(DelayQueue<E> queue, long timeout, TimeUnit timeUnit) Returns null (if an interrupt) or an instance of E; resets interrupt on calling thread.
-
Field Details
-
DELAYED_POISON
POISON implementation; used to mark special state: e.g. shutdown.
-
-
Constructor Details
-
DelayedUtil
private DelayedUtil()
-
-
Method Details
-
takeWithoutInterrupt
public static <E extends Delayed> E takeWithoutInterrupt(DelayQueue<E> queue, long timeout, TimeUnit timeUnit) Returns null (if an interrupt) or an instance of E; resets interrupt on calling thread. -
getRemainingTime
Returns Time remaining as milliseconds. -
compareDelayed
-
getTimeout
-