org.sapia.ubik.mcast
Class ByteArrayPool

java.lang.Object
  extended by org.sapia.ubik.net.Pool
      extended by org.sapia.ubik.mcast.ByteArrayPool

public class ByteArrayPool
extends Pool

This class implements a pool of byte arrays.

Author:
yduchesne

Field Summary
 
Fields inherited from class org.sapia.ubik.net.Pool
_currentCount, _lastUsageTime, _maxSize, _objects, NO_MAX, NO_TIME_OUT
 
Constructor Summary
ByteArrayPool(int bufSize)
          Creates a new instance of ByteArrayPool
 
Method Summary
protected  java.lang.Object doNewObject()
          This template method should be overridden by inheriting classes to provide object instances that will be pooled.
 int getBufSize()
           
protected  java.lang.Object onAcquire(java.lang.Object o)
           
 void setBufSize(int bufSize)
           
 
Methods inherited from class org.sapia.ubik.net.Pool
acquire, acquire, acquireCreate, cleanup, fill, getCreatedCount, getLastUsageTime, onRelease, release, shrinkTo, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayPool

public ByteArrayPool(int bufSize)
Creates a new instance of ByteArrayPool

Method Detail

setBufSize

public void setBufSize(int bufSize)

getBufSize

public int getBufSize()

onAcquire

protected java.lang.Object onAcquire(java.lang.Object o)
                              throws java.lang.Exception
Overrides:
onAcquire in class Pool
Throws:
java.lang.Exception

doNewObject

protected java.lang.Object doNewObject()
                                throws java.lang.Exception
Description copied from class: Pool
This template method should be overridden by inheriting classes to provide object instances that will be pooled.

Specified by:
doNewObject in class Pool
Returns:
an Object to pool.
Throws:
java.lang.Exception - if an error occurs while creating the object to be returned.


Copyright © 2010 Sapia OSS. All Rights Reserved.