org.tinygroup.jspengine.util
类 SimplePool

java.lang.Object
  继承者 org.tinygroup.jspengine.util.SimplePool

public final class SimplePool
extends Object

Simple object pool. Based on ThreadPool and few other classes The pool will ignore overflow and return null if empty.

作者:
Gal Shachor, Costin

构造方法摘要
SimplePool()
           
SimplePool(int max)
           
 
方法摘要
 Object get()
          Get an object from the pool, null if the pool is empty.
 int getMax()
          Return the size of the pool
 void put(Object o)
          Adds the given object to the pool, and does nothing if the pool is full
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

SimplePool

public SimplePool()

SimplePool

public SimplePool(int max)
方法详细信息

put

public void put(Object o)
Adds the given object to the pool, and does nothing if the pool is full


get

public Object get()
Get an object from the pool, null if the pool is empty.


getMax

public int getMax()
Return the size of the pool



Copyright © 2006–2014 开源组织. All rights reserved.