@InterfaceAudience.Public
public interface RequestController
| Modifier and Type | Interface and Description | 
|---|---|
| static interface  | RequestController.CheckerPicks up the valid data. | 
| static class  | RequestController.ReturnCode | 
| Modifier and Type | Method and Description | 
|---|---|
| void | decTaskCounters(Collection<byte[]> regions,
               ServerName sn)Decrement the counter if a task is accomplished. | 
| long | getNumberOfTasksInProgress()Returns The number of running task. | 
| void | incTaskCounters(Collection<byte[]> regions,
               ServerName sn)Increment the counter if we build a valid task. | 
| RequestController.Checker | newChecker()Returns A new checker for evaluating a batch rows. | 
| void | waitForFreeSlot(long id,
               int periodToTrigger,
               Consumer<Long> trigger)Wait until there is at least one slot for a new task. | 
| void | waitForMaximumCurrentTasks(long max,
                          long id,
                          int periodToTrigger,
                          Consumer<Long> trigger)Waits for the running tasks to complete. | 
RequestController.Checker newChecker()
void incTaskCounters(Collection<byte[]> regions, ServerName sn)
regions - The destination of tasksn - The target servervoid decTaskCounters(Collection<byte[]> regions, ServerName sn)
regions - The destination of tasksn - The target serverlong getNumberOfTasksInProgress()
void waitForMaximumCurrentTasks(long max,
                                long id,
                                int periodToTrigger,
                                Consumer<Long> trigger)
                         throws InterruptedIOException
max - This method will return if the number of running tasks is less than or
                        equal to max.id - the caller's idperiodToTrigger - The period to invoke the trigger. This value is a hint. The real period
                        depends on the implementation.trigger - The object to call periodically.InterruptedIOException - If the waiting is interruptedvoid waitForFreeSlot(long id,
                     int periodToTrigger,
                     Consumer<Long> trigger)
              throws InterruptedIOException
id - the caller's idperiodToTrigger - The period to invoke the trigger. This value is a hint. The real period
                        depends on the implementation.trigger - The object to call periodically.InterruptedIOException - If the waiting is interruptedCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.