public class SimpleRSProcedureManager.SimpleSubprocedurePool extends Object implements Closeable, org.apache.hadoop.hbase.Abortable
Modifier and Type | Field and Description |
---|---|
private boolean |
aborted |
private ThreadPoolExecutor |
executor |
private List<Future<Void>> |
futures |
private String |
name |
private ExecutorCompletionService<Void> |
taskPool |
Constructor and Description |
---|
SimpleSubprocedurePool(String name,
org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
void |
abort(String why,
Throwable e) |
void |
close()
Attempt to cleanly shutdown any running tasks - allows currently running tasks to cleanly
finish
|
boolean |
isAborted() |
void |
submitTask(Callable<Void> task)
Submit a task to the pool.
|
boolean |
waitForOutstandingTasks()
Wait for all of the currently outstanding tasks submitted via
submitTask(Callable) |
private final ExecutorCompletionService<Void> taskPool
private final ThreadPoolExecutor executor
private volatile boolean aborted
public SimpleSubprocedurePool(String name, org.apache.hadoop.conf.Configuration conf)
public void submitTask(Callable<Void> task)
public boolean waitForOutstandingTasks() throws org.apache.hadoop.hbase.errorhandling.ForeignException
submitTask(Callable)
org.apache.hadoop.hbase.errorhandling.ForeignException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void abort(String why, Throwable e)
abort
in interface org.apache.hadoop.hbase.Abortable
public boolean isAborted()
isAborted
in interface org.apache.hadoop.hbase.Abortable
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.