Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.apache.xml.utils
Class ObjectPool

    java.lang.Object
      |
      +--weblogic.apache.xml.utils.ObjectPool

public class ObjectPool
extends java.lang.Object
implements java.io.Serializable

Pool of object of a given type to pick from to help memory usage

This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.

See Also:
  Serialized Form

Constructor Summary
`ObjectPool()` Constructor ObjectPool
`ObjectPool(java.lang.Class type)` Constructor ObjectPool
`ObjectPool(java.lang.Class type, int size)` Constructor ObjectPool
`ObjectPool(java.lang.String className)` Constructor ObjectPool

Method Summary
`void` | `freeInstance(java.lang.Object obj)` Add an instance of the given object to the pool
`java.lang.Object` | `getInstance()` Get an instance of the given object in this pool
`java.lang.Object` | `getInstanceIfFree()` Get an instance of the given object in this pool if available

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

Constructor Detail

### ObjectPool

    public ObjectPool(java.lang.Class type)

  Constructor ObjectPool

  Parameters:
    `type` - Type of objects for this pool

### ObjectPool

    public ObjectPool(java.lang.String className)

  Constructor ObjectPool

  Parameters:
    `className` - Fully qualified name of the type of objects for this pool.

### ObjectPool

    public ObjectPool(java.lang.Class type,
                      int size)

  Constructor ObjectPool

  Parameters:
    `type` - Type of objects for this pool
    `size` - Size of vector to allocate

### ObjectPool

    public ObjectPool()

  Constructor ObjectPool

Method Detail

### getInstanceIfFree

    public java.lang.Object getInstanceIfFree()

  Get an instance of the given object in this pool if available

  Returns:
    an instance of the given object if available or null

### getInstance

    public java.lang.Object getInstance()

  Get an instance of the given object in this pool

  Returns:
    An instance of the given object

### freeInstance

    public void freeInstance(java.lang.Object obj)

  Add an instance of the given object to the pool

  Parameters:
    `obj` - Object to add.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs70
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference