org.apache.hadoop.hbase.client
Class DelayingRunner<T>

java.lang.Object
  extended by org.apache.hadoop.hbase.client.DelayingRunner<T>
All Implemented Interfaces:
Runnable

@InterfaceAudience.Private
public class DelayingRunner<T>
extends Object
implements 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.


Constructor Summary
DelayingRunner(long sleepTime, Map.Entry<byte[],List<Action<T>>> e)
           
 
Method Summary
 void add(Map.Entry<byte[],List<Action<T>>> e)
           
 MultiAction<T> getActions()
           
 long getSleepTime()
           
 void run()
           
 void setRunner(Runnable runner)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelayingRunner

public DelayingRunner(long sleepTime,
                      Map.Entry<byte[],List<Action<T>>> e)
Method Detail

setRunner

public void setRunner(Runnable runner)

run

public void run()
Specified by:
run in interface Runnable

add

public void add(Map.Entry<byte[],List<Action<T>>> e)

getActions

public MultiAction<T> getActions()

getSleepTime

public long getSleepTime()


Copyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.