Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.util
Class RecyclingLinkedList

    java.lang.Object
      java.util.AbstractCollection
          java.util.AbstractList
              com.tangosol.util.SafeLinkedList
                  com.tangosol.util.RecyclingLinkedList

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List

    public class RecyclingLinkedList

extends SafeLinkedList
implements java.lang.Cloneable, java.io.Serializable

Extends SafeLinkedList and adds recycling of Node objects.

Author:
  cp 2002.01.06

Nested Class Summary
`protected class` | `RecyclingLinkedList.Node` A Node in the List.

Field Summary
`protected static int` | `DEFAULT_RECYCLE_MAX` The default maximum number of Nodes to recycle.
`protected RecyclingLinkedList.Node[]` | `m_anodeRecycled` The Nodes to recycle.
`protected int` | `m_cRecycleMax` The maximum number of Nodes to recycle.
`protected int` | `m_cRecycleNodes` The current number of Nodes being recycle.

Fields inherited from class com.tangosol.util.SafeLinkedList
`m_cNodes, m_current, m_head, m_iPos, m_tail`

Fields inherited from class java.util.AbstractList
`modCount`

Constructor Summary
`RecyclingLinkedList()` Construct an empty List.
`RecyclingLinkedList(java.util.Collection collection)` Construct a List containing the elements of the specified Collection.
`RecyclingLinkedList(java.util.Collection collection, int cMaxRecycle)` Construct a List containing the elements of the specified Collection.
`RecyclingLinkedList(int cMaxRecycle)` Construct an empty List.

Method Summary
`java.lang.Object` | `clone()` Create a deep clone of the list.
`protected void` | `initRecycling(int cMaxRecycle)` Initializing the recycling data structures.
`protected SafeLinkedList.Node` | `instantiateNode(java.lang.Object o)` Instantiate a Node.
`protected void` | `recycleNode(RecyclingLinkedList.Node node)` Recycle the passed Node.

Methods inherited from class com.tangosol.util.SafeLinkedList
`add, add, addAll, addAll, clear, contains, containsAll, get, getNode, indexOf, lastIndexOf, main, markPosition, remove, remove, reset, set, size, toArray, toArray`

Methods inherited from class java.util.AbstractList
`equals, hashCode, iterator, listIterator, listIterator, removeRange, subList`

Methods inherited from class java.util.AbstractCollection
`isEmpty, removeAll, retainAll, toString`

Methods inherited from interface java.util.List
`equals, hashCode, isEmpty, iterator, listIterator, listIterator, removeAll, retainAll, subList`

Field Detail

### m_anodeRecycled

    protected transient RecyclingLinkedList.Node[] m_anodeRecycled

  The Nodes to recycle.

### m_cRecycleNodes

    protected transient int m_cRecycleNodes

  The current number of Nodes being recycle.

### m_cRecycleMax

    protected int m_cRecycleMax

  The maximum number of Nodes to recycle.

### DEFAULT_RECYCLE_MAX

    protected static final int DEFAULT_RECYCLE_MAX

  The default maximum number of Nodes to recycle.

  See Also:
    Constant Field Values

Constructor Detail

### RecyclingLinkedList

    public RecyclingLinkedList()

  Construct an empty List.

### RecyclingLinkedList

    public RecyclingLinkedList(int cMaxRecycle)

  Construct an empty List.

  Parameters:
    `cMaxRecycle` - the maximum number of Nodes to recycle at any given time

### RecyclingLinkedList

    public RecyclingLinkedList(java.util.Collection collection)

  Construct a List containing the elements of the specified Collection.

  Parameters:
    `collection` - the Collection to fill this List from

### RecyclingLinkedList

    public RecyclingLinkedList(java.util.Collection collection,
                               int cMaxRecycle)

  Construct a List containing the elements of the specified Collection.

  Parameters:
    `collection` - the Collection to fill this List from
    `cMaxRecycle` - the maximum number of Nodes to recycle at any given time

Method Detail

### initRecycling

    protected void initRecycling(int cMaxRecycle)

  Initializing the recycling data structures.

  Parameters:
    `cMaxRecycle` - the maximum number of Nodes to recycle at any given time

### instantiateNode

    protected SafeLinkedList.Node instantiateNode(java.lang.Object o)

  Instantiate a Node. (Factory pattern.) This method is over-ridden by inheriting implementations if the inheriting implementation extends the inner Node class.

  Overrides:
    `instantiateNode` in class `SafeLinkedList`
  Parameters:
    `o` - the value for the Node

### recycleNode

    protected void recycleNode(RecyclingLinkedList.Node node)

  Recycle the passed Node.

  Parameters:
    `node` - the Node object to recycle

### clone

    public java.lang.Object clone()

  Create a deep clone of the list.

  Overrides:
    `clone` in class `SafeLinkedList`
  Returns:
    a clone of this list

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.