Package net.anwiba.commons.thread.queue
Class WorkQueue.ExecutionHandler
- java.lang.Object
-
- net.anwiba.commons.thread.queue.WorkQueue.ExecutionHandler
-
- All Implemented Interfaces:
java.util.concurrent.RejectedExecutionHandler
- Enclosing class:
- WorkQueue
public static final class WorkQueue.ExecutionHandler extends java.lang.Object implements java.util.concurrent.RejectedExecutionHandler
-
-
Constructor Summary
Constructors Constructor Description ExecutionHandler(ILogger logger, java.lang.String queueName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterExecute(WorkQueue.ProcessScheduledFuture<?> future, java.lang.Throwable throwable, int poolSize, int activeCount, int queueSize, WorkQueue.QueueState queueState)voidbeforeExecute(java.lang.Thread thread, WorkQueue.ProcessScheduledFuture<?> future, int poolSize, int activeCount, int queueSize, WorkQueue.QueueState queueState)voidexecute(WorkQueue.ProcessScheduledFuture<?> future, int poolSize, int activeCount, int queueSize, WorkQueue.QueueState queueState)java.lang.StringgetIdentifierString(IRunnable runnable)voidrejectedExecution(java.lang.Runnable runnable, java.util.concurrent.ThreadPoolExecutor executor)
-
-
-
Constructor Detail
-
ExecutionHandler
public ExecutionHandler(ILogger logger, java.lang.String queueName)
-
-
Method Detail
-
execute
public void execute(WorkQueue.ProcessScheduledFuture<?> future, int poolSize, int activeCount, int queueSize, WorkQueue.QueueState queueState)
-
beforeExecute
public void beforeExecute(java.lang.Thread thread, WorkQueue.ProcessScheduledFuture<?> future, int poolSize, int activeCount, int queueSize, WorkQueue.QueueState queueState)
-
afterExecute
public void afterExecute(WorkQueue.ProcessScheduledFuture<?> future, java.lang.Throwable throwable, int poolSize, int activeCount, int queueSize, WorkQueue.QueueState queueState)
-
getIdentifierString
public java.lang.String getIdentifierString(IRunnable runnable)
-
rejectedExecution
public void rejectedExecution(java.lang.Runnable runnable, java.util.concurrent.ThreadPoolExecutor executor)- Specified by:
rejectedExecutionin interfacejava.util.concurrent.RejectedExecutionHandler
-
-