public class AutomaticWorkQueueImpl extends ThreadPoolExecutor implements AutomaticWorkQueue
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
AutomaticWorkQueueImpl() |
AutomaticWorkQueueImpl(int max) |
AutomaticWorkQueueImpl(int mqs,
int initialThreads,
int highWaterMark,
int lowWaterMark,
long dequeueTimeout) |
AutomaticWorkQueueImpl(int mqs,
int initialThreads,
int highWaterMark,
int lowWaterMark,
long dequeueTimeout,
String name) |
AutomaticWorkQueueImpl(int max,
String name) |
AutomaticWorkQueueImpl(String name) |
Modifier and Type | Method and Description |
---|---|
void |
execute(Runnable command) |
void |
execute(Runnable work,
long timeout)
Submits a work item for execution at some time in the future, waiting for up to a
specified amount of time for the item to be accepted.
|
int |
getHighWaterMark() |
int |
getLowWaterMark() |
WorkQueueManager |
getManager() |
long |
getMaxSize()
Gets the maximum size (capacity) of the backing queue.
|
String |
getName() |
long |
getSize()
Gets the current size of the backing queue.
|
boolean |
isEmpty() |
void |
register() |
void |
schedule(Runnable work,
long delay)
Schedules a work item for execution at some time in the future.
|
void |
setHighWaterMark(int hwm) |
void |
setLowWaterMark(int lwm) |
void |
setManager(WorkQueueManager mgr) |
void |
setName(String s) |
void |
shutdown(boolean processRemainingWorkItems)
Initiates an orderly shutdown.
|
protected void |
terminated() |
String |
toString() |
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
isShutdown
public AutomaticWorkQueueImpl()
public AutomaticWorkQueueImpl(String name)
public AutomaticWorkQueueImpl(int max)
public AutomaticWorkQueueImpl(int max, String name)
public AutomaticWorkQueueImpl(int mqs, int initialThreads, int highWaterMark, int lowWaterMark, long dequeueTimeout)
public AutomaticWorkQueueImpl(int mqs, int initialThreads, int highWaterMark, int lowWaterMark, long dequeueTimeout, String name)
public void setManager(WorkQueueManager mgr)
public WorkQueueManager getManager()
public void setName(String s)
public String getName()
@PostConstruct public void register()
public String toString()
toString
in class ThreadPoolExecutor
public void execute(Runnable command)
execute
in interface Executor
execute
in class ThreadPoolExecutor
public void execute(Runnable work, long timeout)
WorkQueue
public void schedule(Runnable work, long delay)
WorkQueue
public void shutdown(boolean processRemainingWorkItems)
AutomaticWorkQueue
processRemainingWorkItems
is true, waits for all active items to finish execution before returning, otherwise returns
immediately after removing all non active items from the queue.shutdown
in interface AutomaticWorkQueue
protected void terminated()
terminated
in class ThreadPoolExecutor
public long getMaxSize()
public long getSize()
public boolean isEmpty()
public int getHighWaterMark()
public int getLowWaterMark()
public void setHighWaterMark(int hwm)
public void setLowWaterMark(int lwm)
Apache CXF