public class ThreadPool
extends GenericObjectPool
implements java.lang.AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_THREADS |
| Constructor and Description |
|---|
ThreadPool(java.lang.String tenantID,
int poolsize) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
borrowObject() |
PoolableThread |
borrowThread() |
void |
close() |
static ThreadPool |
getInstance() |
void |
returnObject(java.lang.Object thread) |
void |
returnThread(PoolableThread thread) |
public static final int DEFAULT_MAX_THREADS
public static ThreadPool getInstance()
public final java.lang.Object borrowObject()
public final void returnObject(java.lang.Object thread)
throws java.lang.Exception
java.lang.Exceptionpublic final void returnThread(PoolableThread thread) throws java.lang.Exception
java.lang.Exceptionpublic final PoolableThread borrowThread()
public void close()
close in interface java.lang.AutoCloseableCopyright © 2018 SAP SE. All Rights Reserved.