jrun.ejb
Interface InstancePool

All Known Implementing Classes:
SimpleInstancePool

public interface InstancePool

This interface is meant to facilitate pluggable instance pooling, so that different pooling algorithms can swapped in. It is intended that the InstanceInterceptors use implementations of this interface.

Author:
Paul Reilly

Method Summary
 void discard(Instance instance)
           
 Instance get()
           
 int getMaxSize()
           
 int getMinSize()
           
 void pool(Instance instance)
           
 void setMaxSize(int maxSize)
           
 void setMinSize(int minSize)
           
 

Method Detail

get

public Instance get()
Returns:
a pooled instance.

pool

public void pool(Instance instance)
Parameters:
instance - the instance object to be pooled.

discard

public void discard(Instance instance)
             throws java.util.NoSuchElementException
Parameters:
instance - the instance object to be discarded from the pool.

getMaxSize

public int getMaxSize()
Returns:
max size for this pool

getMinSize

public int getMinSize()
Returns:
min size for this pool

setMaxSize

public void setMaxSize(int maxSize)
Parameters:
max - size for this pool

setMinSize

public void setMinSize(int minSize)
Parameters:
min - size for this pool


Copyright � 2002 Macromedia Corporation. All Rights Reserved.