public class SRScheduledThreadPoolExecutor extends ScheduledThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
SRScheduledThreadPoolExecutor(int corePoolSize)
Creates a new
ScheduledThreadPoolExecutor with the
given core pool size. |
SRScheduledThreadPoolExecutor(int corePoolSize,
RejectedExecutionHandler handler)
Creates a new ScheduledThreadPoolExecutor with the given
initial parameters.
|
SRScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory)
Creates a new
ScheduledThreadPoolExecutor with the
given initial parameters. |
SRScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler)
Creates a new ScheduledThreadPoolExecutor with the given
initial parameters.
|
execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submit
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, toString
invokeAll, invokeAll, invokeAny, invokeAny
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
public SRScheduledThreadPoolExecutor(int corePoolSize)
ScheduledThreadPoolExecutor
with the
given core pool size.corePoolSize
- the number of threads to keep in the pool, even
if they are idle, unless allowCoreThreadTimeOut
is setIllegalArgumentException
- if corePoolSize < 0
public SRScheduledThreadPoolExecutor(int corePoolSize, RejectedExecutionHandler handler)
corePoolSize
- the number of threads to keep in the pool, even
if they are idle, unless allowCoreThreadTimeOut
is sethandler
- the handler to use when execution is blocked
because the thread bounds and queue capacities are reachedIllegalArgumentException
- if corePoolSize < 0
NullPointerException
- if handler
is nullpublic SRScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory)
ScheduledThreadPoolExecutor
with the
given initial parameters.corePoolSize
- the number of threads to keep in the pool, even
if they are idle, unless allowCoreThreadTimeOut
is setthreadFactory
- the factory to use when the executor
creates a new threadIllegalArgumentException
- if corePoolSize < 0
NullPointerException
- if threadFactory
is nullpublic SRScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler)
corePoolSize
- the number of threads to keep in the pool, even
if they are idle, unless allowCoreThreadTimeOut
is setthreadFactory
- the factory to use when the executor
creates a new threadhandler
- the handler to use when execution is blocked
because the thread bounds and queue capacities are reachedIllegalArgumentException
- if corePoolSize < 0
NullPointerException
- if threadFactory
or
handler
is nullCopyright © 2013–2023. All rights reserved.