Class TimedBlockingPolicy
java.lang.Object
com.j_spaces.kernel.threadpool.policy.TimedBlockingPolicy
- All Implemented Interfaces:
RejectedExecutionHandler
A handler for rejected tasks that inserts the specified element into this queue, waiting if
necessary up to the specified wait time for space to become available.
-
Constructor Summary
ConstructorsConstructorDescriptionTimedBlockingPolicy(long waitTime) TimedBlockingPolicy(long waitTime, String poolName, boolean warnOnRejection, int warnThreshold, org.slf4j.Logger warnLogger) -
Method Summary
Modifier and TypeMethodDescriptionvoidrejectedExecution(Runnable r, ThreadPoolExecutor executor)
-
Constructor Details
-
TimedBlockingPolicy
public TimedBlockingPolicy(long waitTime) - Parameters:
waitTime- wait time in milliseconds for space to become available.
-
TimedBlockingPolicy
public TimedBlockingPolicy(long waitTime, String poolName, boolean warnOnRejection, int warnThreshold, org.slf4j.Logger warnLogger)
-
-
Method Details
-
rejectedExecution
- Specified by:
rejectedExecutionin interfaceRejectedExecutionHandler
-