Class RecordList

java.lang.Object
com.arjuna.ats.arjuna.coordinator.RecordList

public class RecordList extends Object
This class manages instances of the classes derived from AbstractRecord in the form of an ordered doubly-linked list. The ordering and insertion criteria are not particularly standard - see the comment on 'insert' for the actual algorithm used in insertion. The algorithm assumes that one or more different record type instances (LockRecords, RecoveryRecords, etc.) will be inserted into the list at different times. Each such record contains specific information managing certain properties of any particular object. As execution progresses newly created records may need to be merged with, replace entirely, or be added to existing records that relate to an object. Note, the methods of this class do not need to be synchronized because instances of this class are only used from within synchronized classes. Applications should not use this class.
Since:
JTS 1.0.
Version:
$Id: RecordList.java 2342 2006-03-30 13:06:17Z $
Author:
Mark Little (mark@arjuna.com)
  • Field Details

  • Constructor Details

    • RecordList

      public RecordList()
    • RecordList

      public RecordList(RecordList copy)
  • Method Details

    • getFront

      public final AbstractRecord getFront()
      Remove and return the element at the front of the list.
      Returns:
      the front element.
    • getRear

      public final AbstractRecord getRear()
      Remove and return the element at the tail of the list.
      Returns:
      the last element.
    • getNext

      public AbstractRecord getNext(AbstractRecord current)
    • insert

      public final boolean insert(AbstractRecord newRecord)
      Insert the entry at the head of the list.
    • print

      public final void print(PrintWriter strm)
    • putFront

      public final void putFront(AbstractRecord newRecord)
      Explicit push onto front of list.
    • putRear

      public final void putRear(AbstractRecord newRecord)
      Explicit push onto rear of list.
    • peekFront

      public final AbstractRecord peekFront()
    • peekRear

      public final AbstractRecord peekRear()
    • peekNext

      public final AbstractRecord peekNext(AbstractRecord curr)
    • remove

      public final boolean remove(AbstractRecord oldRecord)
    • size

      public final int size()
      Returns:
      the number of items in the current list.
    • toString

      public String toString()
      Overrides:
      toString in class Object