Class PoolConfiguration
- java.lang.Object
-
- de.aristaflow.adept2.util.objectpool.generic.PoolConfiguration
-
- All Implemented Interfaces:
Cloneable
public final class PoolConfiguration extends Object implements Cloneable
The purpose of this class is to keep the constructor ofGenericObjectPool
simple. In encapsulates the configuration options of aGenericObjectPool
.- Author:
- Patrick Schmidt
-
-
Constructor Summary
Constructors Constructor Description PoolConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PoolConfiguration
clone()
int
getAbandonedObjectTimeout()
int
getAvailableObjectExpirationCheckPeriod()
int
getAvailableObjectExpirationPeriod()
boolean
getKeepCallerTrace()
Returns whether a stack trace of the thread checking out an object should be kept.int
getLeaseCheckPeriod()
int
getMaxAvailableObjectCount()
int
getMaxLeasePeriod()
int
getMaxObjectCount()
boolean
getOnlyReclaimWhenAbandonedAndExpired()
ReclaimAction
getReclaimAction()
boolean
getValidateOnCheckIn()
boolean
getValidateOnCheckOut()
long
getValidationInterval()
void
setAbandonedObjectTimeout(int abandonedObjectTimeout)
void
setAvailableObjectExpirationCheckPeriod(int availableObjectExpirationCheckPeriod)
void
setAvailableObjectExpirationPeriod(int availableObjectExpirationPeriod)
void
setKeepCallerTrace(boolean keepCallerTrace)
Sets whether a stack trace of the thread checking out an object should be kept.void
setLeaseCheckPeriod(int leaseDurationCheckPeriod)
void
setMaxAvailableObjectCount(int maxAvailableObjectCount)
void
setMaxLeasePeriod(int maxLeasePeriod)
void
setMaxObjectCount(int maxObjectCount)
void
setOnlyReclaimWhenAbandonedAndExpired(boolean onlyReclaimWhenAbandonedAndExpired)
void
setReclaimAction(ReclaimAction reclaimAction)
void
setValidateOnCheckIn(boolean validateOnCheckIn)
void
setValidateOnCheckOut(boolean validateOnCheckOut)
PoolConfiguration
setValidationInterval(long validationInterval)
-
-
-
Method Detail
-
getMaxObjectCount
public int getMaxObjectCount()
-
setMaxObjectCount
public void setMaxObjectCount(int maxObjectCount)
-
getMaxAvailableObjectCount
public int getMaxAvailableObjectCount()
-
setMaxAvailableObjectCount
public void setMaxAvailableObjectCount(int maxAvailableObjectCount)
-
getAvailableObjectExpirationPeriod
public int getAvailableObjectExpirationPeriod()
-
setAvailableObjectExpirationPeriod
public void setAvailableObjectExpirationPeriod(int availableObjectExpirationPeriod)
-
getAvailableObjectExpirationCheckPeriod
public int getAvailableObjectExpirationCheckPeriod()
-
setAvailableObjectExpirationCheckPeriod
public void setAvailableObjectExpirationCheckPeriod(int availableObjectExpirationCheckPeriod)
-
getValidateOnCheckOut
public boolean getValidateOnCheckOut()
-
setValidateOnCheckOut
public void setValidateOnCheckOut(boolean validateOnCheckOut)
-
getValidateOnCheckIn
public boolean getValidateOnCheckIn()
-
setValidateOnCheckIn
public void setValidateOnCheckIn(boolean validateOnCheckIn)
-
getValidationInterval
public long getValidationInterval()
-
setValidationInterval
public PoolConfiguration setValidationInterval(long validationInterval)
-
getLeaseCheckPeriod
public int getLeaseCheckPeriod()
-
setLeaseCheckPeriod
public void setLeaseCheckPeriod(int leaseDurationCheckPeriod)
-
getReclaimAction
public ReclaimAction getReclaimAction()
-
setReclaimAction
public void setReclaimAction(ReclaimAction reclaimAction)
-
getMaxLeasePeriod
public int getMaxLeasePeriod()
-
setMaxLeasePeriod
public void setMaxLeasePeriod(int maxLeasePeriod)
-
getAbandonedObjectTimeout
public int getAbandonedObjectTimeout()
-
setAbandonedObjectTimeout
public void setAbandonedObjectTimeout(int abandonedObjectTimeout)
-
getOnlyReclaimWhenAbandonedAndExpired
public boolean getOnlyReclaimWhenAbandonedAndExpired()
-
setOnlyReclaimWhenAbandonedAndExpired
public void setOnlyReclaimWhenAbandonedAndExpired(boolean onlyReclaimWhenAbandonedAndExpired)
-
getKeepCallerTrace
public boolean getKeepCallerTrace()
Returns whether a stack trace of the thread checking out an object should be kept.- Returns:
- whether a stack trace of the thread checking out an object should be kept
-
setKeepCallerTrace
public void setKeepCallerTrace(boolean keepCallerTrace)
Sets whether a stack trace of the thread checking out an object should be kept.- Parameters:
keepCallerTrace
- whether a stack trace of the thread checking out an object should be kept
-
clone
protected PoolConfiguration clone()
-
-