|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.kaha.impl.index.DiskIndexLinkedList
public class DiskIndexLinkedList
A linked list used by IndexItems
| Field Summary | |
|---|---|
protected IndexManager |
indexManager
|
protected IndexItem |
last
|
protected IndexItem |
root
|
protected int |
size
|
| Constructor Summary | |
|---|---|
DiskIndexLinkedList(IndexManager im,
IndexItem header)
Constructs an empty list. |
|
| Method Summary | |
|---|---|
boolean |
add(IndexItem item)
Appends the specified element to the end of this list. |
void |
add(int index,
IndexItem element)
Inserts the specified element at the specified position in this list. |
void |
addFirst(IndexItem item)
Inserts the given element at the beginning of this list. |
void |
addLast(IndexItem item)
Appends the given element to the end of this list. |
void |
clear()
Removes all of the elements from this list. |
IndexItem |
get(int index)
Returns the element at the specified position in this list. |
StoreEntry |
getEntry(StoreEntry current)
Ensure we have the up to date entry |
IndexItem |
getFirst()
Returns the first element in this list. |
IndexItem |
getLast()
Returns the last element in this list. |
IndexItem |
getNextEntry(IndexItem current)
Retrieve the next entry after this entry |
IndexItem |
getPrevEntry(IndexItem current)
Retrive the prev entry after this entry |
IndexItem |
getRoot()
|
int |
indexOf(StoreEntry o)
Returns the index in this list of the first occurrence of the specified element, or -1 if the List does not contain this element. |
boolean |
isEmpty()
is the list empty? |
StoreEntry |
refreshEntry(StoreEntry current)
Update the indexes of a StoreEntry |
void |
remove(IndexItem e)
remove an entry |
Object |
remove(int index)
Removes the element at the specified position in this list. |
StoreEntry |
removeFirst()
Removes and returns the first element from this list. |
Object |
removeLast()
Removes and returns the last element from this list. |
void |
setRoot(IndexItem e)
Set the new Root |
int |
size()
Returns the number of elements in this list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IndexManager indexManager
protected transient IndexItem root
protected transient IndexItem last
protected transient int size
| Constructor Detail |
|---|
public DiskIndexLinkedList(IndexManager im,
IndexItem header)
| Method Detail |
|---|
public IndexItem getRoot()
getRoot in interface IndexLinkedListpublic void setRoot(IndexItem e)
IndexLinkedList
setRoot in interface IndexLinkedListpublic IndexItem getFirst()
getFirst in interface IndexLinkedListpublic IndexItem getLast()
getLast in interface IndexLinkedListpublic StoreEntry removeFirst()
removeFirst in interface IndexLinkedListpublic Object removeLast()
removeLast in interface IndexLinkedListpublic void addFirst(IndexItem item)
addFirst in interface IndexLinkedListo - the element to be inserted at the beginning of this list.public void addLast(IndexItem item)
addLast in interface IndexLinkedListo - the element to be inserted at the end of this list.public int size()
size in interface IndexLinkedListpublic boolean isEmpty()
isEmpty in interface IndexLinkedListpublic boolean add(IndexItem item)
add in interface IndexLinkedListo - element to be appended to this list.
public void clear()
clear in interface IndexLinkedListpublic IndexItem get(int index)
get in interface IndexLinkedListindex - index of element to return.
IndexOutOfBoundsException - if the specified index is is out of
range (index < 0 || index >= size()).
public void add(int index,
IndexItem element)
add in interface IndexLinkedListindex - index at which the specified element is to be inserted.element - element to be inserted.
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).public Object remove(int index)
remove in interface IndexLinkedListindex - the index of the element to removed.
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index >= size()).public int indexOf(StoreEntry o)
indexOf in interface IndexLinkedListo - element to search for.
public IndexItem getNextEntry(IndexItem current)
getNextEntry in interface IndexLinkedListentry -
public IndexItem getPrevEntry(IndexItem current)
getPrevEntry in interface IndexLinkedListentry -
public StoreEntry getEntry(StoreEntry current)
IndexLinkedList
getEntry in interface IndexLinkedListpublic StoreEntry refreshEntry(StoreEntry current)
refreshEntry in interface IndexLinkedListcurrent -
public void remove(IndexItem e)
IndexLinkedList
remove in interface IndexLinkedList
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||