net.sf.sasl.common.pool
Class AbstractPool.PoolEntry<V>

java.lang.Object
  extended by net.sf.sasl.common.pool.AbstractPool.PoolEntry<V>
Enclosing class:
AbstractPool<K,V>

protected static class AbstractPool.PoolEntry<V>
extends Object


Constructor Summary
AbstractPool.PoolEntry(V value, int referenceCounter)
          Initializes the pool entry with the given values.
 
Method Summary
 void decrementReferenceCounter()
          Decrements the reference counter of the pool entry.
 int getReferenceCounter()
          Returns the current value of the reference counter.
 V getValue()
          Returns the value that this entry stores.
 void incrementReferenceCounter()
          Increments the reference counter of the pool entry.
 boolean isGarbage()
          Returns true, if the reference counter of the entry is zero (=garbage).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPool.PoolEntry

public AbstractPool.PoolEntry(V value,
                              int referenceCounter)
Initializes the pool entry with the given values.

Parameters:
value - null or non null.
referenceCounter - intial value.
Since:
0.0.2 (sasl-common-library)
Method Detail

getValue

public V getValue()
Returns the value that this entry stores.

Returns:
null or non null.
Since:
0.0.2 (sasl-common-library)

incrementReferenceCounter

public void incrementReferenceCounter()
Increments the reference counter of the pool entry.

Since:
0.0.2 (sasl-common-library)

decrementReferenceCounter

public void decrementReferenceCounter()
Decrements the reference counter of the pool entry.

Since:
0.0.2 (sasl-common-library)

getReferenceCounter

public int getReferenceCounter()
Returns the current value of the reference counter.

Returns:
positive integer value.
Since:
0.0.2 (sasl-common-library)

isGarbage

public boolean isGarbage()
Returns true, if the reference counter of the entry is zero (=garbage). False else.

Returns:
true or false.
Since:
0.0.2 (sasl-common-library)


Copyright © 2010. All Rights Reserved.