com.evolveum.midpoint.xml.common
Class ObjectPool<T>

java.lang.Object
  extended by com.evolveum.midpoint.xml.common.ObjectPool<T>

public abstract class ObjectPool<T>
extends java.lang.Object

Sample Class Doc

Since:
1.0.0
Version:
$Revision$ $Date$
Author:
$author$

Field Summary
static java.lang.String code_id
           
 
Constructor Summary
ObjectPool()
           
ObjectPool(int initialSize)
           
 
Method Summary
 void checkin(T pooled)
          Check-in a pooled object to the object pool.
 T checkout()
          Checkout a pooled object, or create one if none are available.
protected abstract  T create()
          Creates a new pool member.
 void dispose()
           
 int numLocked()
           
 int numUnlocked()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

ObjectPool

public ObjectPool()

ObjectPool

public ObjectPool(int initialSize)
Method Detail

dispose

public void dispose()

create

protected abstract T create()
Creates a new pool member.

Returns:

checkout

public T checkout()
Checkout a pooled object, or create one if none are available.

Returns:

checkin

public void checkin(T pooled)
Check-in a pooled object to the object pool.

Parameters:
pooled -

numLocked

public int numLocked()

numUnlocked

public int numUnlocked()


Copyright © 2011 evolveum. All Rights Reserved.