Class BlockingRejectedExecutionHandler
java.lang.Object
com.broadleafcommerce.dataexchange.domain.util.BlockingRejectedExecutionHandler
- All Implemented Interfaces:
RejectedExecutionHandler
An implementation of
RejectedExecutionHandler that makes use of the scheduling (or
calling) thread to schedule a Callable or Runnable for
execution.- Author:
- Kelly Tisdell (ktisdell)
- See Also:
-
ExecutorConfigurationSupport.setRejectedExecutionHandler(RejectedExecutionHandler)
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs aBlockingRejectedExecutionHandlerthat will wait indefinitely to for space to become available on a queue to schedule a task.BlockingRejectedExecutionHandler(long timeoutMillis) Specifies the maximum amount of time in milliseconds that a thread should wait to schedule a a task, or for space to become available on a queue so that the task may be queued. -
Method Summary
Modifier and TypeMethodDescriptionvoidrejectedExecution(Runnable r, ThreadPoolExecutor executor)
-
Constructor Details
-
BlockingRejectedExecutionHandler
public BlockingRejectedExecutionHandler()Constructs aBlockingRejectedExecutionHandlerthat will wait indefinitely to for space to become available on a queue to schedule a task. -
BlockingRejectedExecutionHandler
public BlockingRejectedExecutionHandler(long timeoutMillis) Specifies the maximum amount of time in milliseconds that a thread should wait to schedule a a task, or for space to become available on a queue so that the task may be queued.- Parameters:
timeoutMillis-
-
-
Method Details
-
rejectedExecution
- Specified by:
rejectedExecutionin interfaceRejectedExecutionHandler
-