public class FabricThreadPool
extends java.lang.Object
Title: Framework Support Library
Description: Defines a pool of the FabricThread
instances.
Copyright: Copyright (c) 2010
Company: StreamScape Technologies
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.Future |
addTask(java.util.concurrent.Callable task)
Adds the specified task for execution.
|
java.util.concurrent.Future |
addTask(java.lang.Runnable task)
Adds the specified task for execution.
|
int |
getCurrentThreadsNumber()
Returns a current number of threads in the pool.
|
java.lang.String |
getDescription()
Returns a description of the pool.
|
java.util.concurrent.ExecutorService |
getExecutor()
Returns underlying executor.
|
int |
getMaximumThreadsNumber()
Returns a maximum number of threads in the pool.
|
java.lang.String |
getName()
Returns a name of the pool.
|
ThreadPoolType |
getType()
Returns a type of the pool.
|
boolean |
isDaemon()
Indicates if the pool contains daemon threads.
|
void |
stop()
Tries to stop all thread of the pool.
|
public ThreadPoolType getType()
public java.lang.String getName()
public java.lang.String getDescription()
public boolean isDaemon()
true
if if the pool contains daemon threads, false
otherwise.public int getMaximumThreadsNumber()
public int getCurrentThreadsNumber()
public java.util.concurrent.Future addTask(java.lang.Runnable task)
task
- the task to be executed.java.util.concurrent.RejectedExecutionException
- if the task cannot be scheduled for execution.public java.util.concurrent.Future addTask(java.util.concurrent.Callable task)
task
- the task to be executed.java.util.concurrent.RejectedExecutionException
- if the task cannot be scheduled for execution.public java.util.concurrent.ExecutorService getExecutor()
public void stop()
ExecutorService.shutdownNow()
).Copyright © 2015-2024 StreamScape Technologies. All rights reserved.