ObjectPool
insteadpublic abstract class ResourcePool extends Object
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULTSIZE
Deprecated.
|
protected org.apache.log4j.Logger |
LOGGER
Deprecated.
|
Constructor and Description |
---|
ResourcePool()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
checkResource(Object resource)
Deprecated.
Checks wether or not the resource is broken.
|
abstract Object |
createResource()
Deprecated.
Creates a new resource.
|
abstract void |
destroyResource(Object resource)
Deprecated.
Destroys an existing resource.
|
Object |
getResource()
Deprecated.
Retrieves a resource object from the pool.
|
void |
putResource(Object resource)
Deprecated.
Puts back a resource object that previously was retrieved from this pool.
|
void |
statistics()
Deprecated.
|
protected static final int DEFAULTSIZE
protected final org.apache.log4j.Logger LOGGER
public Object getResource()
public void putResource(Object resource)
resource
- the resource to give back to the poolpublic abstract Object createResource()
public abstract void destroyResource(Object resource)
resource
- the resource object to destroypublic abstract boolean checkResource(Object resource)
public void statistics()
© 1998- 2021 Escenic AS