Java java.util.concurrent ScheduledThreadPoolExecutor fields, constructors, methods, implement or subclass

Example usage for Java java.util.concurrent ScheduledThreadPoolExecutor fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util.concurrent ScheduledThreadPoolExecutor.

The text is from its open source code.

Subclass

java.util.concurrent.ScheduledThreadPoolExecutor has subclasses.
Click this link to see all its subclasses.

Constructor

ScheduledThreadPoolExecutor(int corePoolSize)
Creates a new ScheduledThreadPoolExecutor with the given core pool size.
ScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory)
Creates a new ScheduledThreadPoolExecutor with the given initial parameters.
ScheduledThreadPoolExecutor(int corePoolSize, RejectedExecutionHandler handler)
Creates a new ScheduledThreadPoolExecutor with the given initial parameters.
ScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler)
Creates a new ScheduledThreadPoolExecutor with the given initial parameters.

Method

voidallowCoreThreadTimeOut(boolean value)
Sets the policy governing whether core threads may time out and terminate if no tasks arrive within the keep-alive time, being replaced if needed when new tasks arrive.
booleanawaitTermination(long timeout, TimeUnit unit)
ClassgetClass()
Returns the runtime class of this Object .
longgetCompletedTaskCount()
Returns the approximate total number of tasks that have completed execution.
booleangetContinueExistingPeriodicTasksAfterShutdownPolicy()
Gets the policy on whether to continue executing existing periodic tasks even when this executor has been shutdown .
booleangetExecuteExistingDelayedTasksAfterShutdownPolicy()
Gets the policy on whether to execute existing delayed tasks even when this executor has been shutdown .
longgetKeepAliveTime(TimeUnit unit)
Returns the thread keep-alive time, which is the amount of time that threads may remain idle before being terminated.
intgetPoolSize()
Returns the current number of threads in the pool.
BlockingQueuegetQueue()
Returns the task queue used by this executor.
booleangetRemoveOnCancelPolicy()
Gets the policy on whether cancelled tasks should be immediately removed from the work queue at time of cancellation.
ThreadFactorygetThreadFactory()
Returns the thread factory used to create new threads.
booleanremove(Runnable task)
Removes this task from the executor's internal queue if it is present, thus causing it not to be run if it has not already started.
ScheduledFutureschedule(Runnable command, long delay, TimeUnit unit)
ScheduledFutureschedule(Callable callable, long delay, TimeUnit unit)
ScheduledFuturescheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
Submits a periodic action that becomes enabled first after the given initial delay, and subsequently with the given period; that is, executions will commence after initialDelay , then initialDelay + period , then initialDelay + 2 * period , and so on.
ScheduledFuturescheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
Submits a periodic action that becomes enabled first after the given initial delay, and subsequently with the given delay between the termination of one execution and the commencement of the next.
voidsetContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value)
Sets the policy on whether to continue executing existing periodic tasks even when this executor has been shutdown .
voidsetCorePoolSize(int corePoolSize)
Sets the core number of threads.
voidsetExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value)
Sets the policy on whether to execute existing delayed tasks even when this executor has been shutdown .
voidsetKeepAliveTime(long time, TimeUnit unit)
Sets the thread keep-alive time, which is the amount of time that threads may remain idle before being terminated.
voidsetMaximumPoolSize(int maximumPoolSize)
Sets the maximum allowed number of threads.
voidsetRejectedExecutionHandler(RejectedExecutionHandler handler)
Sets a new handler for unexecutable tasks.
voidshutdown()
Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted.
Futuresubmit(Runnable task)
Futuresubmit(Callable task)