Class DelegatingSimpleScheduledExecutor
java.lang.Object
org.hibernate.search.engine.common.execution.spi.DelegatingSimpleScheduledExecutor
- All Implemented Interfaces:
SimpleScheduledExecutor
@Incubating
public class DelegatingSimpleScheduledExecutor
extends Object
implements SimpleScheduledExecutor
-
Constructor Summary
ConstructorsConstructorDescriptionDelegatingSimpleScheduledExecutor(ScheduledExecutorService delegate, boolean blocking) -
Method Summary
Modifier and TypeMethodDescriptionbooleanSubmits a task that becomes enabled after the given delay.voidAttempts to stop all actively executing tasks, halts the processing of waiting tasks.Future<?> Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.search.engine.common.execution.spi.SimpleScheduledExecutor
offer
-
Constructor Details
-
DelegatingSimpleScheduledExecutor
-
-
Method Details
-
submit
Description copied from interface:SimpleScheduledExecutor- Specified by:
submitin interfaceSimpleScheduledExecutor- Parameters:
task- the task to submit- Returns:
- a
Futurerepresenting pending completion of the task
-
schedule
Description copied from interface:SimpleScheduledExecutorSubmits a task that becomes enabled after the given delay.- Specified by:
schedulein interfaceSimpleScheduledExecutor- Parameters:
command- the task to executedelay- the time from now to delay executionunit- the time unit of the delay parameter- Returns:
- a
ScheduledFuturerepresenting pending completion of the submitted task.
-
shutdownNow
public void shutdownNow()Description copied from interface:SimpleScheduledExecutorAttempts to stop all actively executing tasks, halts the processing of waiting tasks.- Specified by:
shutdownNowin interfaceSimpleScheduledExecutor
-
isBlocking
public boolean isBlocking()- Specified by:
isBlockingin interfaceSimpleScheduledExecutor- Returns:
trueif this executor may block when a task is submitted to it;falseif it never block (e.g. throws anRejectedExecutionException).
-