@InterfaceAudience.Private public abstract class BulkAssigner extends java.lang.Object
populatePool(java.util.concurrent.ExecutorService) and
waitUntilDone(long). The default implementation of
the getUncaughtExceptionHandler() is to abort the hosting
Server.| Constructor and Description |
|---|
BulkAssigner(Server server) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
bulkAssign() |
boolean |
bulkAssign(boolean sync)
Run the bulk assign.
|
protected int |
getThreadCount() |
protected java.lang.String |
getThreadNamePrefix() |
protected long |
getTimeoutOnRIT() |
protected java.lang.Thread.UncaughtExceptionHandler |
getUncaughtExceptionHandler() |
protected abstract void |
populatePool(java.util.concurrent.ExecutorService pool) |
protected abstract boolean |
waitUntilDone(long timeout)
Wait until bulk assign is done.
|
protected final Server server
public BulkAssigner(Server server)
server - An instance of Serverprotected java.lang.String getThreadNamePrefix()
protected java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionHandler()
protected int getThreadCount()
protected long getTimeoutOnRIT()
protected abstract void populatePool(java.util.concurrent.ExecutorService pool)
throws java.io.IOException
java.io.IOExceptionpublic boolean bulkAssign()
throws java.lang.InterruptedException,
java.io.IOException
java.lang.InterruptedExceptionjava.io.IOExceptionpublic boolean bulkAssign(boolean sync)
throws java.lang.InterruptedException,
java.io.IOException
sync - Whether to assign synchronously.java.lang.InterruptedExceptionjava.io.IOExceptionprotected abstract boolean waitUntilDone(long timeout)
throws java.lang.InterruptedException
timeout - How long to wait.java.lang.InterruptedException