org.ldaptive.pool
Class AbstractPool<T>

java.lang.Object
  extended by org.ldaptive.pool.AbstractPool<T>
Type Parameters:
T - type of object being pooled
Direct Known Subclasses:
AbstractConnectionPool

public abstract class AbstractPool<T>
extends Object

Contains functionality common to pool implementations.

Version:
$Revision: 2972 $ $Date: 2014-04-21 12:15:38 -0400 (Mon, 21 Apr 2014) $
Author:
Middleware Services

Field Summary
protected  org.slf4j.Logger logger
          Logger for this class.
 
Constructor Summary
AbstractPool()
           
 
Method Summary
 boolean activate(T t)
          Prepare the object to exit the pool for use.
 Activator<T> getActivator()
          Returns the activator for this pool.
 String getName()
          Returns the name for this pool.
 Passivator<T> getPassivator()
          Returns the passivator for this pool.
 PoolConfig getPoolConfig()
          Returns the configuration for this pool.
 PruneStrategy getPruneStrategy()
          Returns the prune strategy for this pool.
 Validator<T> getValidator()
          Returns the validator for this pool.
 boolean passivate(T t)
          Prepare the object to enter the pool after use.
 void setActivator(Activator<T> a)
          Sets the activator for this pool.
 void setName(String s)
          Sets the name for this pool.
 void setPassivator(Passivator<T> p)
          Sets the passivator for this pool.
 void setPoolConfig(PoolConfig pc)
          Sets the configuration for this pool.
 void setPruneStrategy(PruneStrategy ps)
          Sets the prune strategy for this pool.
 void setValidator(Validator<T> v)
          Sets the validator for this pool.
 boolean validate(T t)
          Verify the object is still viable for use in the pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.slf4j.Logger logger
Logger for this class.

Constructor Detail

AbstractPool

public AbstractPool()
Method Detail

getName

public String getName()
Returns the name for this pool.

Returns:
pool name

setName

public void setName(String s)
Sets the name for this pool.

Parameters:
s - pool name

getPoolConfig

public PoolConfig getPoolConfig()
Returns the configuration for this pool.

Returns:
pool config

setPoolConfig

public void setPoolConfig(PoolConfig pc)
Sets the configuration for this pool.

Parameters:
pc - pool config

getActivator

public Activator<T> getActivator()
Returns the activator for this pool.

Returns:
activator

setActivator

public void setActivator(Activator<T> a)
Sets the activator for this pool.

Parameters:
a - activator

activate

public boolean activate(T t)
Prepare the object to exit the pool for use.

Parameters:
t - pooled object
Returns:
whether the object successfully activated

getPassivator

public Passivator<T> getPassivator()
Returns the passivator for this pool.

Returns:
passivator

setPassivator

public void setPassivator(Passivator<T> p)
Sets the passivator for this pool.

Parameters:
p - passivator

passivate

public boolean passivate(T t)
Prepare the object to enter the pool after use.

Parameters:
t - pooled object
Returns:
whether the object successfully passivated

getValidator

public Validator<T> getValidator()
Returns the validator for this pool.

Returns:
validator

setValidator

public void setValidator(Validator<T> v)
Sets the validator for this pool.

Parameters:
v - validator

validate

public boolean validate(T t)
Verify the object is still viable for use in the pool.

Parameters:
t - pooled object
Returns:
whether the object is viable

getPruneStrategy

public PruneStrategy getPruneStrategy()
Returns the prune strategy for this pool.

Returns:
prune strategy

setPruneStrategy

public void setPruneStrategy(PruneStrategy ps)
Sets the prune strategy for this pool.

Parameters:
ps - prune strategy


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.