Transfer version 1.1

transfer.com.collections
Class AbstractBaseSemiSoftRefObjectPool

WEB-INF.cftags.component
        extended by transfer.com.collections.AbstractBaseSemiSoftRefObjectPool
Direct Known Subclasses:
TransferObjectPool , TransferEventPool , QueryExecutionPool , TransactionEventPool , QueryPool

public class AbstractBaseSemiSoftRefObjectPool
extends WEB-INF.cftags.component

A object pool that maintains two collections, one hard reference, one soft reference


Constructor Summary
init(numeric hardReferenceAmount, JavaLoader javaLoader)
          Constructor
 
Method Summary
private any getHardQueue()
          org.apache.commons.collections.UnboundedFifoBuffer
private numeric getHardReferenceAmount()
private any getNewObject()
          virtual method: returns the new CFC to repopulate the pool
private any getReferenceQueue()
          java.lang.ref.ReferenceQueue
private any getSoftQueue()
          org.apache.commons.collections.UnboundedFifoBuffer
 any pop()
          pops an objects outta the queue
 any popSoftQueue()
          pops an object off the soft queue if one exists, otherwise returns 'false'
 void push(any object)
          Pushes an object onto the queue
private void reap()
          reaps the collected objects out of the pool
private void refill()
          refill the hard cache
private void setHardQueue(any HardQueue)
private void setHardReferenceAmount(numeric hardReferenceAmount)
private void setReferenceQueue(any ReferenceQueue)
private void setSoftQueue(any SoftQueue)
private any throw(string type, string message, [string detail=''])
          Throws an Exception
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(numeric hardReferenceAmount, JavaLoader javaLoader)
Constructor

Parameters:
hardReferenceAmount - The amount of hard references to keep
javaLoader - The java loader for the apache commons
Method Detail

getHardQueue

private any getHardQueue()
org.apache.commons.collections.UnboundedFifoBuffer


getHardReferenceAmount

private numeric getHardReferenceAmount()


getNewObject

private any getNewObject()
virtual method: returns the new CFC to repopulate the pool


getReferenceQueue

private any getReferenceQueue()
java.lang.ref.ReferenceQueue


getSoftQueue

private any getSoftQueue()
org.apache.commons.collections.UnboundedFifoBuffer


pop

public any pop()
pops an objects outta the queue


popSoftQueue

public any popSoftQueue()
pops an object off the soft queue if one exists, otherwise returns 'false'


push

public void push(any object)
Pushes an object onto the queue

Parameters:
object - the object to push on

reap

private void reap()
reaps the collected objects out of the pool


refill

private void refill()
refill the hard cache


setHardQueue

private void setHardQueue(any HardQueue)

Parameters:
HardQueue - org.apache.commons.collections.UnboundedFifoBuffer

setHardReferenceAmount

private void setHardReferenceAmount(numeric hardReferenceAmount)

Parameters:
hardReferenceAmount

setReferenceQueue

private void setReferenceQueue(any ReferenceQueue)

Parameters:
ReferenceQueue - java.lang.ref.ReferenceQueue

setSoftQueue

private void setSoftQueue(any SoftQueue)

Parameters:
SoftQueue - org.apache.commons.collections.UnboundedFifoBuffer

throw

private any throw(string type, string message, [string detail=''])
Throws an Exception

Parameters:
type - The type of exception
message - The message to accompany the exception
detail - The detail message for the exception

Transfer version 1.1