Top Description Inners Fields Constructors Methods
org.springframework.scheduling.concurrent

public Class ThreadPoolTaskScheduler

extends ExecutorConfigurationSupport
implements AsyncListenableTaskExecutor, SchedulingTaskExecutor, TaskScheduler
Class Inheritance
All Implemented Interfaces
org.springframework.scheduling.TaskScheduler, org.springframework.scheduling.SchedulingTaskExecutor, org.springframework.core.task.AsyncTaskExecutor, org.springframework.core.task.TaskExecutor, java.util.concurrent.Executor, org.springframework.core.task.AsyncListenableTaskExecutor
Annotations
@SuppressWarnings:serial, deprecation
Imports
java.time.Clock, .Duration, .Instant, java.util.Map, java.util.concurrent.Callable, .Executor, .ExecutorService, .Future, .RejectedExecutionException, .RejectedExecutionHandler, .ScheduledExecutorService, .ScheduledFuture, .ScheduledThreadPoolExecutor, .ThreadFactory, .TimeUnit, org.springframework.core.task.AsyncListenableTaskExecutor, .TaskRejectedException, org.springframework.lang.Nullable, org.springframework.scheduling.SchedulingTaskExecutor, .TaskScheduler, .Trigger, org.springframework.scheduling.support.TaskUtils, org.springframework.util.Assert, .ConcurrentReferenceHashMap, .ErrorHandler, org.springframework.util.concurrent.ListenableFuture, .ListenableFutureTask

References Deprecated

AsyncListenableTaskExecutor is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

A standard implementation of Spring's TaskScheduler interface, wrapping a native java.util.concurrent.ScheduledThreadPoolExecutor and providing all applicable configuration options for it.
Authors
Juergen Hoeller, Mark Fisher
Since
3.0
See Also
setPoolSize, setRemoveOnCancelPolicy, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setThreadFactory, setErrorHandler

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private Clock
private volatile boolean
private volatile ErrorHandler
private volatile boolean
private final Map<Object, ListenableFuture<?>>
private static final TimeUnit
private volatile int
private volatile boolean
private ScheduledExecutorService
Inherited from org.springframework.scheduling.concurrent.ExecutorConfigurationSupport:
logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
cancelRemainingTask(Runnable
the task to cancel (typically a RunnableFuture)
task
)

Overrides org.springframework.scheduling.concurrent.ExecutorConfigurationSupport.cancelRemainingTask.

Cancel the given remaining task which never commenced execution, as returned from ExecutorService#shutdownNow().

protected ScheduledExecutorService

Returns:

a new ScheduledExecutorService instance
createExecutor
(int
the specified pool size
poolSize
,
ThreadFactory
the ThreadFactory to use
threadFactory
,
RejectedExecutionHandler
the RejectedExecutionHandler to use
rejectedExecutionHandler
)

Create a new ScheduledExecutorService instance.

private Runnable
errorHandlingTask(Runnable task, boolean isRepeatingTask)

public void
execute(Runnable
the Runnable to execute (never null)
task
)

Implements org.springframework.core.task.TaskExecutor.execute.

Execute the given task.

private void
executeAndTrack(ExecutorService executor, ListenableFutureTask<?> listenableFuture)
References Deprecated ListenableFutureTask is deprecated or references (maybe indirectly) at least one deprecated element.

public int
getActiveCount()

Return the number of currently active threads.

public Clock
getClock()

Overrides default org.springframework.scheduling.TaskScheduler.getClock.

Return the clock to use for scheduling purposes.

public int
getPoolSize()

Return the current pool size.

public ScheduledExecutorService

Returns:

the underlying ScheduledExecutorService (never null)
getScheduledExecutor
()

Return the underlying ScheduledExecutorService for native access.

public ScheduledThreadPoolExecutor

Returns:

the underlying ScheduledExecutorService (never null)
getScheduledThreadPoolExecutor
()

Return the underlying ScheduledThreadPoolExecutor, if available.

protected ExecutorService
initializeExecutor(ThreadFactory
the ThreadFactory to use
threadFactory
,
RejectedExecutionHandler
the RejectedExecutionHandler to use
rejectedExecutionHandler
)

Implements abstract org.springframework.scheduling.concurrent.ExecutorConfigurationSupport.initializeExecutor.

Create the target java.util.concurrent.ExecutorService instance.

public boolean
isRemoveOnCancelPolicy()
Deprecated as of 5.3.9, in favor of direct getScheduledThreadPoolExecutor() access

Return the current setting for the remove-on-cancel mode.

public ScheduledFuture<?>
schedule(Runnable
the Runnable to execute whenever the trigger fires
task
,
Trigger
an implementation of the Trigger interface, e.g. a org.springframework.scheduling.support.CronTrigger object wrapping a cron expression
trigger
)

Implements org.springframework.scheduling.TaskScheduler.schedule.

Schedule the given Runnable, invoking it whenever the trigger indicates a next execution time.

public ScheduledFuture<?>
schedule(Runnable
the Runnable to execute whenever the trigger fires
task
,
Instant
the desired execution time for the task (if this is in the past, the task will be executed immediately, i.e. as soon as possible)
startTime
)

Implements org.springframework.scheduling.TaskScheduler.schedule.

Schedule the given Runnable, invoking it at the specified execution time.

public ScheduledFuture<?>
scheduleAtFixedRate(Runnable
the Runnable to execute whenever the trigger fires
task
,
Instant
the desired first execution time for the task (if this is in the past, the task will be executed immediately, i.e. as soon as possible)
startTime
,
Duration
the interval between successive executions of the task
period
)

Implements org.springframework.scheduling.TaskScheduler.scheduleAtFixedRate.

Schedule the given Runnable, invoking it at the specified execution time and subsequently with the given period.

public ScheduledFuture<?>
scheduleAtFixedRate(Runnable
the Runnable to execute whenever the trigger fires
task
,
Duration
the interval between successive executions of the task
period
)

Implements org.springframework.scheduling.TaskScheduler.scheduleAtFixedRate.

Schedule the given Runnable, starting as soon as possible and invoking it with the given period.

public ScheduledFuture<?>
scheduleWithFixedDelay(Runnable
the Runnable to execute whenever the trigger fires
task
,
Instant
the desired first execution time for the task (if this is in the past, the task will be executed immediately, i.e. as soon as possible)
startTime
,
Duration
the delay between the completion of one execution and the start of the next
delay
)

Implements org.springframework.scheduling.TaskScheduler.scheduleWithFixedDelay.

Schedule the given Runnable, invoking it at the specified execution time and subsequently with the given delay between the completion of one execution and the start of the next.

public ScheduledFuture<?>
scheduleWithFixedDelay(Runnable
the Runnable to execute whenever the trigger fires
task
,
Duration
the delay between the completion of one execution and the start of the next
delay
)

Implements org.springframework.scheduling.TaskScheduler.scheduleWithFixedDelay.

Schedule the given Runnable, starting as soon as possible and invoking it with the given delay between the completion of one execution and the start of the next.

public void
setClock(Clock clock)

Set the clock to use for scheduling purposes.

public void
setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean flag)

Set whether to continue existing periodic tasks even when this executor has been shutdown.

public void
setErrorHandler(ErrorHandler errorHandler)

Set a custom ErrorHandler strategy.

public void
setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean flag)

Set whether to execute existing delayed tasks even when this executor has been shutdown.

public void
setPoolSize(int poolSize)

Set the ScheduledExecutorService's pool size.

public void
setRemoveOnCancelPolicy(boolean flag)

Set the remove-on-cancel mode on ScheduledThreadPoolExecutor.

public Future<?>
submit(Runnable
the Runnable to execute (never null)
task
)

Overrides default org.springframework.core.task.AsyncTaskExecutor.submit.

Submit a Runnable task for execution, receiving a Future representing that task.

public <T> Future<T>
submit(Callable<T>
the Callable to execute (never null)
task
)

Overrides default org.springframework.core.task.AsyncTaskExecutor.submit.

Submit a Callable task for execution, receiving a Future representing that task.

public ListenableFuture<?>
submitListenable(Runnable
the Runnable to execute (never null)
task
)

Implements org.springframework.core.task.AsyncListenableTaskExecutor.submitListenable.

References Deprecated ListenableFuture is deprecated or references (maybe indirectly) at least one deprecated element.

Submit a Runnable task for execution, receiving a ListenableFuture representing that task.

public <T> ListenableFuture<T>
submitListenable(Callable<T>
the Callable to execute (never null)
task
)

Implements org.springframework.core.task.AsyncListenableTaskExecutor.submitListenable.

References Deprecated ListenableFuture is deprecated or references (maybe indirectly) at least one deprecated element.

Submit a Callable task for execution, receiving a ListenableFuture representing that task.

Inherited from org.springframework.scheduling.concurrent.ExecutorConfigurationSupport:
afterExecuteafterPropertiesSetbeforeExecutedestroygetPhaseinitializeinitiateEarlyShutdowninitiateShutdownisRunningonApplicationEventsetAcceptTasksAfterContextClosesetApplicationContextsetAwaitTerminationMillissetAwaitTerminationSecondssetBeanNamesetPhasesetRejectedExecutionHandlersetThreadFactorysetThreadNamePrefixsetWaitForTasksToCompleteOnShutdownshutdownstartstopstop

Field Detail

clockback to summary
private Clock clock
continueExistingPeriodicTasksAfterShutdownPolicyback to summary
private volatile boolean continueExistingPeriodicTasksAfterShutdownPolicy
errorHandlerback to summary
private volatile ErrorHandler errorHandler
Annotations
@Nullable
executeExistingDelayedTasksAfterShutdownPolicyback to summary
private volatile boolean executeExistingDelayedTasksAfterShutdownPolicy
listenableFutureMapback to summary
private final Map<Object, ListenableFuture<?>> listenableFutureMap
NANOback to summary
private static final TimeUnit NANO
poolSizeback to summary
private volatile int poolSize
removeOnCancelPolicyback to summary
private volatile boolean removeOnCancelPolicy
scheduledExecutorback to summary
private ScheduledExecutorService scheduledExecutor
Annotations
@Nullable

Constructor Detail

ThreadPoolTaskSchedulerback to summary
public ThreadPoolTaskScheduler()

Method Detail

cancelRemainingTaskback to summary
protected void cancelRemainingTask(Runnable task)

Overrides org.springframework.scheduling.concurrent.ExecutorConfigurationSupport.cancelRemainingTask.

Doc from org.springframework.scheduling.concurrent.ExecutorConfigurationSupport.cancelRemainingTask.

Cancel the given remaining task which never commenced execution, as returned from ExecutorService#shutdownNow().

Parameters
task:Runnable

the task to cancel (typically a RunnableFuture)

Annotations
@Override
createExecutorback to summary
protected ScheduledExecutorService createExecutor(int poolSize, ThreadFactory threadFactory, RejectedExecutionHandler rejectedExecutionHandler)

Create a new ScheduledExecutorService instance.

The default implementation creates a ScheduledThreadPoolExecutor. Can be overridden in subclasses to provide custom ScheduledExecutorService instances.

Parameters
poolSize:int

the specified pool size

threadFactory:ThreadFactory

the ThreadFactory to use

rejectedExecutionHandler:RejectedExecutionHandler

the RejectedExecutionHandler to use

Returns:ScheduledExecutorService

a new ScheduledExecutorService instance

See Also
afterPropertiesSet(), java.util.concurrent.ScheduledThreadPoolExecutor
errorHandlingTaskback to summary
private Runnable errorHandlingTask(Runnable task, boolean isRepeatingTask)
executeback to summary
public void execute(Runnable task)

Implements org.springframework.core.task.TaskExecutor.execute.

Doc from org.springframework.core.task.TaskExecutor.execute.

Execute the given task.

The call might return immediately if the implementation uses an asynchronous execution strategy, or might block in the case of synchronous execution.

Parameters
task:Runnable

the Runnable to execute (never null)

Annotations
@Override
executeAndTrackback to summary
private void executeAndTrack(ExecutorService executor, ListenableFutureTask<?> listenableFuture)

References Deprecated

ListenableFutureTask is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

getActiveCountback to summary
public int getActiveCount()

Return the number of currently active threads.

Requires an underlying ScheduledThreadPoolExecutor.

See Also
getScheduledThreadPoolExecutor(), java.util.concurrent.ScheduledThreadPoolExecutor#getActiveCount()
getClockback to summary
public Clock getClock()

Overrides default org.springframework.scheduling.TaskScheduler.getClock.

Doc from org.springframework.scheduling.TaskScheduler.getClock.

Return the clock to use for scheduling purposes.

Annotations
@Override
getPoolSizeback to summary
public int getPoolSize()

Return the current pool size.

Requires an underlying ScheduledThreadPoolExecutor.

See Also
getScheduledThreadPoolExecutor(), java.util.concurrent.ScheduledThreadPoolExecutor#getPoolSize()
getScheduledExecutorback to summary
public ScheduledExecutorService getScheduledExecutor() throws IllegalStateException

Return the underlying ScheduledExecutorService for native access.

Returns:ScheduledExecutorService

the underlying ScheduledExecutorService (never null)

Exceptions
IllegalStateException:
if the ThreadPoolTaskScheduler hasn't been initialized yet
getScheduledThreadPoolExecutorback to summary
public ScheduledThreadPoolExecutor getScheduledThreadPoolExecutor() throws IllegalStateException

Return the underlying ScheduledThreadPoolExecutor, if available.

Returns:ScheduledThreadPoolExecutor

the underlying ScheduledExecutorService (never null)

Exceptions
IllegalStateException:
if the ThreadPoolTaskScheduler hasn't been initialized yet or if the underlying ScheduledExecutorService isn't a ScheduledThreadPoolExecutor
See Also
getScheduledExecutor()
initializeExecutorback to summary
protected ExecutorService initializeExecutor(ThreadFactory threadFactory, RejectedExecutionHandler rejectedExecutionHandler)

Implements abstract org.springframework.scheduling.concurrent.ExecutorConfigurationSupport.initializeExecutor.

Doc from org.springframework.scheduling.concurrent.ExecutorConfigurationSupport.initializeExecutor.

Create the target java.util.concurrent.ExecutorService instance. Called by afterPropertiesSet.

Parameters
threadFactory:ThreadFactory

the ThreadFactory to use

rejectedExecutionHandler:RejectedExecutionHandler

the RejectedExecutionHandler to use

Returns:ExecutorService

a new ExecutorService instance

Annotations
@Override
isRemoveOnCancelPolicyback to summary
public boolean isRemoveOnCancelPolicy()

Deprecated

as of 5.3.9, in favor of direct getScheduledThreadPoolExecutor() access

Return the current setting for the remove-on-cancel mode.

Requires an underlying ScheduledThreadPoolExecutor.

Annotations
@Deprecated
scheduleback to summary
public ScheduledFuture<?> schedule(Runnable task, Trigger trigger)

Implements org.springframework.scheduling.TaskScheduler.schedule.

Doc from org.springframework.scheduling.TaskScheduler.schedule.

Schedule the given Runnable, invoking it whenever the trigger indicates a next execution time.

Execution will end once the scheduler shuts down or the returned ScheduledFuture gets cancelled.

Parameters
task:Runnable

the Runnable to execute whenever the trigger fires

trigger:Trigger

an implementation of the Trigger interface, e.g. a org.springframework.scheduling.support.CronTrigger object wrapping a cron expression

Returns:ScheduledFuture<?>

a ScheduledFuture representing pending completion of the task, or null if the given Trigger object never fires (i.e. returns null from Trigger#nextExecution)

Annotations
@Override
@Nullable
scheduleback to summary
public ScheduledFuture<?> schedule(Runnable task, Instant startTime)

Implements org.springframework.scheduling.TaskScheduler.schedule.

Doc from org.springframework.scheduling.TaskScheduler.schedule.

Schedule the given Runnable, invoking it at the specified execution time.

Execution will end once the scheduler shuts down or the returned ScheduledFuture gets cancelled.

Parameters
task:Runnable

the Runnable to execute whenever the trigger fires

startTime:Instant

the desired execution time for the task (if this is in the past, the task will be executed immediately, i.e. as soon as possible)

Returns:ScheduledFuture<?>

a ScheduledFuture representing pending completion of the task

Annotations
@Override
scheduleAtFixedRateback to summary
public ScheduledFuture<?> scheduleAtFixedRate(Runnable task, Instant startTime, Duration period)

Implements org.springframework.scheduling.TaskScheduler.scheduleAtFixedRate.

Doc from org.springframework.scheduling.TaskScheduler.scheduleAtFixedRate.

Schedule the given Runnable, invoking it at the specified execution time and subsequently with the given period.

Execution will end once the scheduler shuts down or the returned ScheduledFuture gets cancelled.

Parameters
task:Runnable

the Runnable to execute whenever the trigger fires

startTime:Instant

the desired first execution time for the task (if this is in the past, the task will be executed immediately, i.e. as soon as possible)

period:Duration

the interval between successive executions of the task

Returns:ScheduledFuture<?>

a ScheduledFuture representing pending completion of the task

Annotations
@Override
scheduleAtFixedRateback to summary
public ScheduledFuture<?> scheduleAtFixedRate(Runnable task, Duration period)

Implements org.springframework.scheduling.TaskScheduler.scheduleAtFixedRate.

Doc from org.springframework.scheduling.TaskScheduler.scheduleAtFixedRate.

Schedule the given Runnable, starting as soon as possible and invoking it with the given period.

Execution will end once the scheduler shuts down or the returned ScheduledFuture gets cancelled.

Parameters
task:Runnable

the Runnable to execute whenever the trigger fires

period:Duration

the interval between successive executions of the task

Returns:ScheduledFuture<?>

a ScheduledFuture representing pending completion of the task

Annotations
@Override
scheduleWithFixedDelayback to summary
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable task, Instant startTime, Duration delay)

Implements org.springframework.scheduling.TaskScheduler.scheduleWithFixedDelay.

Doc from org.springframework.scheduling.TaskScheduler.scheduleWithFixedDelay.

Schedule the given Runnable, invoking it at the specified execution time and subsequently with the given delay between the completion of one execution and the start of the next.

Execution will end once the scheduler shuts down or the returned ScheduledFuture gets cancelled.

Parameters
task:Runnable

the Runnable to execute whenever the trigger fires

startTime:Instant

the desired first execution time for the task (if this is in the past, the task will be executed immediately, i.e. as soon as possible)

delay:Duration

the delay between the completion of one execution and the start of the next

Returns:ScheduledFuture<?>

a ScheduledFuture representing pending completion of the task

Annotations
@Override
scheduleWithFixedDelayback to summary
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable task, Duration delay)

Implements org.springframework.scheduling.TaskScheduler.scheduleWithFixedDelay.

Doc from org.springframework.scheduling.TaskScheduler.scheduleWithFixedDelay.

Schedule the given Runnable, starting as soon as possible and invoking it with the given delay between the completion of one execution and the start of the next.

Execution will end once the scheduler shuts down or the returned ScheduledFuture gets cancelled.

Parameters
task:Runnable

the Runnable to execute whenever the trigger fires

delay:Duration

the delay between the completion of one execution and the start of the next

Returns:ScheduledFuture<?>

a ScheduledFuture representing pending completion of the task

Annotations
@Override
setClockback to summary
public void setClock(Clock clock)

Set the clock to use for scheduling purposes.

The default clock is the system clock for the default time zone.

Since
5.3
See Also
Clock#systemDefaultZone()
setContinueExistingPeriodicTasksAfterShutdownPolicyback to summary
public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean flag)

Set whether to continue existing periodic tasks even when this executor has been shutdown.

Default is false. If set to true, the target executor will be switched into continuing periodic tasks (if possible).

This setting can be modified at runtime, for example through JMX.

Since
5.3.9
See Also
ScheduledThreadPoolExecutor#setContinueExistingPeriodicTasksAfterShutdownPolicy
setErrorHandlerback to summary
public void setErrorHandler(ErrorHandler errorHandler)

Set a custom ErrorHandler strategy.

setExecuteExistingDelayedTasksAfterShutdownPolicyback to summary
public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean flag)

Set whether to execute existing delayed tasks even when this executor has been shutdown.

Default is true. If set to false, the target executor will be switched into dropping remaining tasks (if possible).

This setting can be modified at runtime, for example through JMX.

Since
5.3.9
See Also
ScheduledThreadPoolExecutor#setExecuteExistingDelayedTasksAfterShutdownPolicy
setPoolSizeback to summary
public void setPoolSize(int poolSize)

Set the ScheduledExecutorService's pool size. Default is 1.

This setting can be modified at runtime, for example through JMX.

setRemoveOnCancelPolicyback to summary
public void setRemoveOnCancelPolicy(boolean flag)

Set the remove-on-cancel mode on ScheduledThreadPoolExecutor.

Default is false. If set to true, the target executor will be switched into remove-on-cancel mode (if possible).

This setting can be modified at runtime, for example through JMX.

See Also
ScheduledThreadPoolExecutor#setRemoveOnCancelPolicy
submitback to summary
public Future<?> submit(Runnable task)

Overrides default org.springframework.core.task.AsyncTaskExecutor.submit.

Doc from org.springframework.core.task.AsyncTaskExecutor.submit.

Submit a Runnable task for execution, receiving a Future representing that task. The Future will return a null result upon completion.

As of 6.1, this method comes with a default implementation that delegates to execute(Runnable).

Parameters
task:Runnable

the Runnable to execute (never null)

Returns:Future<?>

a Future representing pending completion of the task

Annotations
@Override
submitback to summary
public <T> Future<T> submit(Callable<T> task)

Overrides default org.springframework.core.task.AsyncTaskExecutor.submit.

Doc from org.springframework.core.task.AsyncTaskExecutor.submit.

Submit a Callable task for execution, receiving a Future representing that task. The Future will return the Callable's result upon completion.

As of 6.1, this method comes with a default implementation that delegates to execute(Runnable).

Parameters
task:Callable<T>

the Callable to execute (never null)

Returns:Future<T>

a Future representing pending completion of the task

Annotations
@Override
submitListenableback to summary
public ListenableFuture<?> submitListenable(Runnable task)

Implements org.springframework.core.task.AsyncListenableTaskExecutor.submitListenable.

Doc from org.springframework.core.task.AsyncListenableTaskExecutor.submitListenable.

References Deprecated

ListenableFuture is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Submit a Runnable task for execution, receiving a ListenableFuture representing that task. The Future will return a null result upon completion.

Parameters
task:Runnable

the Runnable to execute (never null)

Returns:ListenableFuture<?>

a ListenableFuture representing pending completion of the task

Annotations
@Override
submitListenableback to summary
public <T> ListenableFuture<T> submitListenable(Callable<T> task)

Implements org.springframework.core.task.AsyncListenableTaskExecutor.submitListenable.

Doc from org.springframework.core.task.AsyncListenableTaskExecutor.submitListenable.

References Deprecated

ListenableFuture is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Submit a Callable task for execution, receiving a ListenableFuture representing that task. The Future will return the Callable's result upon completion.

Parameters
task:Callable<T>

the Callable to execute (never null)

Returns:ListenableFuture<T>

a ListenableFuture representing pending completion of the task

Annotations
@Override
org.springframework.scheduling.concurrent back to summary

private Class ThreadPoolTaskScheduler.DelegatingErrorHandlingCallable<V>

extends Object
implements Callable<V>
Class Inheritance
  • java.lang.Object
  • org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler.DelegatingErrorHandlingCallable
All Implemented Interfaces
java.util.concurrent.Callable

Field Summary

Modifier and TypeField and Description
private final Callable<V>
private final ErrorHandler

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public V
call()

Implements java.util.concurrent.Callable.call.

Computes a result, or throws an exception if unable to do so.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final Callable<V> delegate
errorHandlerback to summary
private final ErrorHandler errorHandler

Constructor Detail

DelegatingErrorHandlingCallableback to summary
public DelegatingErrorHandlingCallable(Callable<V> delegate, ErrorHandler errorHandler)

Method Detail

callback to summary
public V call() throws Exception

Implements java.util.concurrent.Callable.call.

Doc from java.util.concurrent.Callable.call.

Computes a result, or throws an exception if unable to do so.

Returns:V

computed result

Annotations
@Override
@Nullable
Exceptions
Exception:
if unable to compute a result