## org.apache.jasper.util
Class SimplePool

    java.lang.Object
      org.apache.jasper.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.

Author:
  Gal Shachor, Costin

Constructor Summary
`SimplePool()`
`SimplePool(int max)`

Method Summary
`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

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimplePool

    public SimplePool()

### SimplePool

    public SimplePool(int max)

Method Detail

### 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 © 2008 Mort Bay Consulting. All Rights Reserved.