Class RecordList
java.lang.Object
com.arjuna.ats.arjuna.coordinator.RecordList
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal AbstractRecord
getFront()
Remove and return the element at the front of the list.getNext
(AbstractRecord current) final AbstractRecord
getRear()
Remove and return the element at the tail of the list.final boolean
insert
(AbstractRecord newRecord) Insert the entry at the head of the list.final AbstractRecord
final AbstractRecord
peekNext
(AbstractRecord curr) final AbstractRecord
peekRear()
final void
print
(PrintWriter strm) final void
putFront
(AbstractRecord newRecord) Explicit push onto front of list.final void
putRear
(AbstractRecord newRecord) Explicit push onto rear of list.final boolean
remove
(AbstractRecord oldRecord) final int
size()
toString()
-
Field Details
-
listHead
-
-
Constructor Details
-
RecordList
public RecordList() -
RecordList
-
-
Method Details
-
getFront
Remove and return the element at the front of the list.- Returns:
- the front element.
-
getRear
Remove and return the element at the tail of the list.- Returns:
- the last element.
-
getNext
-
insert
Insert the entry at the head of the list. -
print
-
putFront
Explicit push onto front of list. -
putRear
Explicit push onto rear of list. -
peekFront
-
peekRear
-
peekNext
-
remove
-
size
public final int size()- Returns:
- the number of items in the current list.
-
toString
-