|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.vt.middleware.ldap.props.AbstractPropertyConfig
edu.vt.middleware.ldap.pool.LdapPoolConfig
public class LdapPoolConfig
LdapPoolConfig contains all the configuration data that the
pooling implementations need to control the pool.
| Field Summary | |
|---|---|
static long |
DEFAULT_EXPIRATION_TIME
Default expiration time, value is 600000L. |
static int |
DEFAULT_MAX_POOL_SIZE
Default max pool size, value is 10. |
static int |
DEFAULT_MIN_POOL_SIZE
Default min pool size, value is 3. |
static long |
DEFAULT_PRUNE_TIMER_PERIOD
Default prune timer period, value is 300000L. |
static boolean |
DEFAULT_VALIDATE_ON_CHECKIN
Default validate on check in, value is false. |
static boolean |
DEFAULT_VALIDATE_ON_CHECKOUT
Default validate on check out, value is false. |
static boolean |
DEFAULT_VALIDATE_PERIODICALLY
Default validate periodically, value is false. |
static long |
DEFAULT_VALIDATE_TIMER_PERIOD
Default validate timer period, value is 1800000L. |
static String |
PROPERTIES_DOMAIN
Domain to look for ldap properties in, value is "edu.vt.middleware.ldap.pool.". |
| Fields inherited from class edu.vt.middleware.ldap.props.AbstractPropertyConfig |
|---|
logger |
| Constructor Summary | |
|---|---|
LdapPoolConfig()
Default constructor. |
|
| Method Summary | |
|---|---|
static LdapPoolConfig |
createFromProperties(InputStream is)
Create an instance of this class initialized with properties from the input stream. |
long |
getExpirationTime()
This returns the expiration time for the LdapPoolConfig. |
int |
getMaxPoolSize()
This returns the max pool size for the LdapPoolConfig. |
int |
getMinPoolSize()
This returns the min pool size for the LdapPoolConfig. |
String |
getPropertiesDomain()
This returns the properties domain for this property config. |
long |
getPruneTimerPeriod()
This returns the prune timer period for the LdapPoolConfig. |
long |
getValidateTimerPeriod()
This returns the validate timer period for the LdapPoolConfig. |
boolean |
hasEnvironmentProperty(String name)
This returns whether the supplied property exists. |
boolean |
isValidateOnCheckIn()
This returns the validate on check in flag for the
LdapPoolConfig. |
boolean |
isValidateOnCheckOut()
This returns the validate on check out flag for the
LdapPoolConfig. |
boolean |
isValidatePeriodically()
This returns the validate periodically flag for the
LdapPoolConfig. |
void |
setEnvironmentProperties(String name,
String value)
This adds environment properties to this object. If name or value is null, then this method does nothing. |
void |
setExpirationTime(long time)
Sets the time that an ldap object should be considered stale and ready for removal from the pool. |
void |
setMaxPoolSize(int size)
This sets the max pool size for the LdapPoolConfig. |
void |
setMinPoolSize(int size)
This sets the min pool size for the LdapPoolConfig. |
void |
setPruneTimerPeriod(long time)
Sets the period for which the prune pool timer will run. |
void |
setValidateOnCheckIn(boolean b)
This sets the validate on check in flag for the
LdapPoolConfig. |
void |
setValidateOnCheckOut(boolean b)
This sets the validate on check out flag for the
LdapPoolConfig. |
void |
setValidatePeriodically(boolean b)
This sets the validate periodically flag for the
LdapPoolConfig. |
void |
setValidateTimerPeriod(long time)
Sets the period for which the validate pool timer will run. |
| Methods inherited from class edu.vt.middleware.ldap.props.AbstractPropertyConfig |
|---|
checkImmutable, checkStringInput, makeImmutable, setEnvironmentProperties, setEnvironmentProperties |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTIES_DOMAIN
public static final int DEFAULT_MIN_POOL_SIZE
public static final int DEFAULT_MAX_POOL_SIZE
public static final boolean DEFAULT_VALIDATE_ON_CHECKIN
public static final boolean DEFAULT_VALIDATE_ON_CHECKOUT
public static final boolean DEFAULT_VALIDATE_PERIODICALLY
public static final long DEFAULT_VALIDATE_TIMER_PERIOD
public static final long DEFAULT_PRUNE_TIMER_PERIOD
public static final long DEFAULT_EXPIRATION_TIME
| Constructor Detail |
|---|
public LdapPoolConfig()
| Method Detail |
|---|
public int getMinPoolSize()
LdapPoolConfig. Default
value is DEFAULT_MIN_POOL_SIZE. This value represents the size of
the pool after the prune timer has run.
int - min pool sizepublic int getMaxPoolSize()
LdapPoolConfig. Default
value is DEFAULT_MAX_POOL_SIZE. This value may or may not be
strictly enforced depending on the pooling implementation.
int - max pool sizepublic boolean isValidateOnCheckIn()
LdapPoolConfig. Default value is DEFAULT_VALIDATE_ON_CHECKIN.
boolean - validate on check inpublic boolean isValidateOnCheckOut()
LdapPoolConfig. Default value is DEFAULT_VALIDATE_ON_CHECKOUT.
boolean - validate on check inpublic boolean isValidatePeriodically()
LdapPoolConfig. Default value is DEFAULT_VALIDATE_PERIODICALLY.
boolean - validate periodicallypublic long getPruneTimerPeriod()
LdapPoolConfig.
Default value is DEFAULT_PRUNE_TIMER_PERIOD. The prune timer
attempts to execute LdapPool.prune().
long - prune timer period in millisecondspublic long getValidateTimerPeriod()
LdapPoolConfig.
Default value is DEFAULT_VALIDATE_TIMER_PERIOD. The validate timer
attempts to execute LdapPool.validate().
long - validate timer period in millisecondspublic long getExpirationTime()
LdapPoolConfig.
Default value is DEFAULT_EXPIRATION_TIME. The expiration time
represents the max time an ldap object should be available before it is
considered stale. This value does not apply to objects in the pool if the
pool has only a minimum number of objects available.
long - expiration time in millisecondspublic void setMinPoolSize(int size)
LdapPoolConfig.
size - intpublic void setMaxPoolSize(int size)
LdapPoolConfig.
size - intpublic void setValidateOnCheckIn(boolean b)
LdapPoolConfig.
b - booleanpublic void setValidateOnCheckOut(boolean b)
LdapPoolConfig.
b - booleanpublic void setValidatePeriodically(boolean b)
LdapPoolConfig.
b - booleanpublic void setPruneTimerPeriod(long time)
time - in millisecondspublic void setValidateTimerPeriod(long time)
time - in millisecondspublic void setExpirationTime(long time)
time - in millisecondspublic String getPropertiesDomain()
getPropertiesDomain in interface PropertyConfiggetPropertiesDomain in class AbstractPropertyConfigString properties domain
public void setEnvironmentProperties(String name,
String value)
setEnvironmentProperties in interface PropertyConfigsetEnvironmentProperties in class AbstractPropertyConfigname - String property namevalue - String property valuepublic boolean hasEnvironmentProperty(String name)
hasEnvironmentProperty in interface PropertyConfighasEnvironmentProperty in class AbstractPropertyConfigname - String to check
boolean whether the supplied property existspublic static LdapPoolConfig createFromProperties(InputStream is)
is - to load properties from
LdapPoolConfig initialized ldap pool config
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||