public class GenericPool
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
POOL_CHECKOUT |
static int |
POOL_CLOSED |
static int |
POOL_INVALID |
static int |
POOL_OK |
Constructor and Description |
---|
GenericPool(java.lang.String name,
int minSize,
int capacity,
java.lang.Object obj,
java.lang.Object[] initArgs) |
GenericPool(java.lang.String name,
int minSize,
int capacity,
java.lang.Object obj,
java.lang.String closerName,
java.lang.String createrName,
java.lang.Object[] initArgs) |
GenericPool(java.lang.String name,
int minSize,
int capacity,
java.lang.Object obj,
java.lang.String closerName,
java.lang.String createrName,
java.lang.Object[] initArgs,
java.lang.Class[] pt) |
Modifier and Type | Method and Description |
---|---|
void |
checkin(java.lang.Object obj,
int s)
It checks in the used instance of the object.
|
java.lang.Object |
checkout(long milliSec)
returns an active instance of the object with the default args.
|
java.lang.Object |
checkout(long milliSec,
java.lang.Object[] args)
It checks out an active instance of the object.
|
void |
close() |
protected java.lang.Object |
create(java.lang.Object[] initArgs) |
protected void |
destroy(int id) |
protected void |
finalize() |
int |
getCapacity()
returns capacity of the pool
|
int |
getCount()
returns number of active instances not in use
|
int |
getId(java.lang.Object obj)
returns the ID of the object or -1 if it has no such object
|
java.lang.Object |
getInitArg(int i)
It returns the i-th default init argument or null if out of range.
|
java.lang.String |
getName() |
int |
getNumberOfArgs()
returns the length of the default initArgs
|
int |
getSize()
returns number of active instances regardless it is used or not
|
int |
getStatus()
returns the mask of internal XQueue
|
public static final int POOL_OK
public static final int POOL_CHECKOUT
public static final int POOL_INVALID
public static final int POOL_CLOSED
public GenericPool(java.lang.String name, int minSize, int capacity, java.lang.Object obj, java.lang.String closerName, java.lang.String createrName, java.lang.Object[] initArgs, java.lang.Class[] pt)
public GenericPool(java.lang.String name, int minSize, int capacity, java.lang.Object obj, java.lang.String closerName, java.lang.String createrName, java.lang.Object[] initArgs)
public GenericPool(java.lang.String name, int minSize, int capacity, java.lang.Object obj, java.lang.Object[] initArgs)
public java.lang.Object checkout(long milliSec, java.lang.Object[] args)
public java.lang.Object checkout(long milliSec)
public void checkin(java.lang.Object obj, int s)
public java.lang.String getName()
public int getCapacity()
public int getSize()
public int getCount()
public int getStatus()
public int getNumberOfArgs()
public java.lang.Object getInitArg(int i)
public int getId(java.lang.Object obj)
public void close()
protected void finalize()
finalize
in class java.lang.Object
protected java.lang.Object create(java.lang.Object[] initArgs)
protected void destroy(int id)