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 TypeMethodDescriptionboolean
Submits a task that becomes enabled after the given delay.void
Attempts 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, wait
Methods 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:
submit
in interfaceSimpleScheduledExecutor
- Parameters:
task
- the task to submit- Returns:
- a
Future
representing pending completion of the task
-
schedule
Description copied from interface:SimpleScheduledExecutor
Submits a task that becomes enabled after the given delay.- Specified by:
schedule
in interfaceSimpleScheduledExecutor
- Parameters:
command
- the task to executedelay
- the time from now to delay executionunit
- the time unit of the delay parameter- Returns:
- a
ScheduledFuture
representing pending completion of the submitted task.
-
shutdownNow
public void shutdownNow()Description copied from interface:SimpleScheduledExecutor
Attempts to stop all actively executing tasks, halts the processing of waiting tasks.- Specified by:
shutdownNow
in interfaceSimpleScheduledExecutor
-
isBlocking
public boolean isBlocking()- Specified by:
isBlocking
in interfaceSimpleScheduledExecutor
- Returns:
true
if this executor may block when a task is submitted to it;false
if it never block (e.g. throws anRejectedExecutionException
).
-