protected void
afterExecute(Runnable r, Throwable t)
Method invoked upon completion of execution of the given Runnable.
void
allowCoreThreadTimeOut(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.
boolean
allowsCoreThreadTimeOut()
Returns true if this pool allows core threads to time out and terminate if no tasks arrive within the keepAlive time, being replaced if needed when new tasks arrive.
boolean
awaitTermination(long timeout, TimeUnit unit)
Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.
protected void
beforeExecute(Thread t, Runnable r)
Method invoked prior to executing the given Runnable in the given thread.
void
execute(Runnable command)
Executes the given task sometime in the future.
protected void
finalize()
Invokes shutdown
when this executor is no longer referenced and it has no threads.
int
getActiveCount()
Returns the approximate number of threads that are actively executing tasks.
long
getCompletedTaskCount()
Returns the approximate total number of tasks that have completed execution.
int
getCorePoolSize()
Returns the core number of threads.
long
getKeepAliveTime(TimeUnit unit)
Returns the thread keep-alive time, which is the amount of time that threads in excess of the core pool size may remain idle before being terminated.
int
getLargestPoolSize()
Returns the largest number of threads that have ever simultaneously been in the pool.
int
getMaximumPoolSize()
Returns the maximum allowed number of threads.
int
getPoolSize()
Returns the current number of threads in the pool.
BlockingQueue<Runnable>
getQueue()
Returns the task queue used by this executor.
RejectedExecutionHandler
getRejectedExecutionHandler()
Returns the current handler for unexecutable tasks.
long
getTaskCount()
Returns the approximate total number of tasks that have ever been scheduled for execution.
ThreadFactory
getThreadFactory()
Returns the thread factory used to create new threads.
boolean
isShutdown()
Returns true
if this executor has been shut down.
boolean
isTerminated()
Returns true
if all tasks have completed following shut down.
boolean
isTerminating()
Returns true if this executor is in the process of terminating after
shutdown()
or
shutdownNow()
but has not completely terminated.
int
prestartAllCoreThreads()
Starts all core threads, causing them to idly wait for work.
boolean
prestartCoreThread()
Starts a core thread, causing it to idly wait for work.
void
purge()
Tries to remove from the work queue all
Future
tasks that have been cancelled.
boolean
remove(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.
void
setCorePoolSize(int corePoolSize)
Sets the core number of threads.
void
setKeepAliveTime(long time, TimeUnit unit)
Sets the time limit for which threads may remain idle before being terminated.
void
setMaximumPoolSize(int maximumPoolSize)
Sets the maximum allowed number of threads.
void
setRejectedExecutionHandler(RejectedExecutionHandler handler)
Sets a new handler for unexecutable tasks.
void
setThreadFactory(ThreadFactory threadFactory)
Sets the thread factory used to create new threads.
void
shutdown()
Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted.
List<Runnable>
shutdownNow()
Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution.
protected void
terminated()
Method invoked when the Executor has terminated.
String
toString()
Returns a string identifying this pool, as well as its state, including indications of run state and estimated worker and task counts.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4