SimplePool (Velocity 1.7 API)
Keywords: org.apache.velocity.util.SimplePool class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.velocity.util
Class SimplePool

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

Version:
  $Id: SimplePool.java 463298 2006-10-12 16:10:32Z henning $
Author:
  Gal Shachor, Costin, Geir Magnusson Jr.

Constructor Summary
`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)` Add the object to the pool, silent 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(int max)

Parameters:
  `max` -

Method Detail

### put

    public void put(Object o)

  Add the object to the pool, silent nothing if the pool is full

  Parameters:
    `o` -

### get

    public Object get()

  Get an object from the pool, null if the pool is empty.

  Returns:
    The object from the pool.

### getMax

    public int getMax()

  Return the size of the pool

  Returns:
    The pool size.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.