public abstract class AbstractPool extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
mm_maxPoolSize |
protected List |
mm_unlocked
Contains pool objects that are available for use
|
| Constructor and Description |
|---|
AbstractPool(int initialCapacity)
Construct a pool given an initial capacity and the maximum number set to 100
to manage
|
AbstractPool(int initialCapacity,
int nbInitialInstance)
Construct a pool given an initial capacity and the number of initial items
to manage
|
AbstractPool(int initialCapacity,
int nbInitialInstance,
int maxNumberObjects)
Construct a pool given an initial capacity and the maximum number of items
to manage
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract Object |
createPoolObject()
Factory method to create pool objects
|
protected abstract void |
expirePoolObject(Object o)
Callback when object are not managed anymore by the pool.
|
Object |
getPoolObject()
Returns an object from the pool.
|
void |
releasePoolObject(Object o)
Tells the pool to release an object and make it available
in the pool.
|
protected void |
updateController(Object buffer,
boolean add) |
protected abstract boolean |
validatePoolObject(Object o)
Method called to validate an object that has been put back in the pool
|
protected int mm_maxPoolSize
protected List mm_unlocked
public AbstractPool(int initialCapacity)
initialCapacity - the initial container capacitypublic AbstractPool(int initialCapacity,
int nbInitialInstance)
initialCapacity - the initial container capacity. You should here choose
a value that is as close as the given maxNumberObjects.nbInitialInstance - the initial number of objects to manage in the poolpublic AbstractPool(int initialCapacity,
int nbInitialInstance,
int maxNumberObjects)
initialCapacity - the initial container capacity. You should here choose
a value that is as close as the given maxNumberObjects.nbInitialInstance - the initial number of objects to manage in the poolmaxNumberObjects - the maximum number of objects to manage in the pool. value -1 means infinite.protected abstract Object createPoolObject() throws Exception
Exceptionprotected abstract boolean validatePoolObject(Object o)
o - the object to validateprotected abstract void expirePoolObject(Object o)
o - the object that is to be expiredpublic Object getPoolObject() throws Exception
Exceptionpublic void releasePoolObject(Object o)
o - the object to release.protected void updateController(Object buffer, boolean add)
| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] EP-BASIS-API
|
[sap.com]
|
default
|
EP-PIN-PRT
|
[sap.com] EP-BASIS-API
|
[sap.com] tc/epbc/prt/api
|
api
|
EP-PIN
|
[sap.com] EP-BASIS-API
|
[sap.com] tc/epbc/prt/lib/api
|
api
|
EP-PIN
|
[sap.com] EP-RUNTIME
|
[sap.com] tc/ep/semantics/api
|
api
|
EP-PIN
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2021 SAP SE Complete Copyright Notice