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
Constructors Constructor Description DelegatingSimpleScheduledExecutor(ScheduledExecutorService delegate, boolean blocking)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisBlocking()ScheduledFuture<?>schedule(Runnable command, long delay, TimeUnit unit)Submits a task that becomes enabled after the given delay.voidshutdownNow()Attempts to stop all actively executing tasks, halts the processing of waiting tasks.Future<?>submit(Runnable task)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.engine.common.execution.spi.SimpleScheduledExecutor
offer
-
-
-
-
Constructor Detail
-
DelegatingSimpleScheduledExecutor
public DelegatingSimpleScheduledExecutor(ScheduledExecutorService delegate, boolean blocking)
-
-
Method Detail
-
submit
public Future<?> submit(Runnable task)
Description copied from interface:SimpleScheduledExecutor- Specified by:
submitin interfaceSimpleScheduledExecutor- Parameters:
task- the task to submit- Returns:
- a
Futurerepresenting pending completion of the task
-
schedule
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
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).
-
-