Class ListNode<Key,Value>
- java.lang.Object
-
- org.apache.activemq.store.kahadb.disk.index.ListNode<Key,Value>
-
public final class ListNode<Key,Value> extends Object
The ListNode class represents a node in the List object graph. It is stored in one overflowing Page of a PageFile.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ListNode.NodeMarshaller<Key,Value>
The Marshaller is used to store and load the data in the ListNode into a Page.
-
Constructor Summary
Constructors Constructor Description ListNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Value
addFirst(Transaction tx, Key key, Value value)
void
clear(Transaction tx)
boolean
contains(Transaction tx, Key key)
Value
get(Transaction tx, Key key)
ListIndex<Key,Value>
getContainingList()
Map.Entry<Key,Value>
getFirst(Transaction tx)
Map.Entry<Key,Value>
getLast(Transaction tx)
long
getNext()
Page<ListNode<Key,Value>>
getPage()
long
getPageId()
boolean
isEmpty(Transaction tx)
boolean
isHead()
boolean
isTail()
Iterator<Map.Entry<Key,Value>>
iterator(Transaction tx)
Iterator<Map.Entry<Key,Value>>
iterator(Transaction tx, long pos)
Value
put(Transaction tx, Key key, Value value)
void
setContainingList(ListIndex<Key,Value> list)
void
setNext(long next)
void
setPage(Page<ListNode<Key,Value>> page)
int
size(Transaction tx)
void
storeUpdate(Transaction tx)
String
toString()
-
-
-
Method Detail
-
put
public Value put(Transaction tx, Key key, Value value) throws IOException
- Throws:
IOException
-
addFirst
public Value addFirst(Transaction tx, Key key, Value value) throws IOException
- Throws:
IOException
-
storeUpdate
public void storeUpdate(Transaction tx) throws IOException
- Throws:
IOException
-
get
public Value get(Transaction tx, Key key)
-
isEmpty
public boolean isEmpty(Transaction tx)
-
getFirst
public Map.Entry<Key,Value> getFirst(Transaction tx)
-
getLast
public Map.Entry<Key,Value> getLast(Transaction tx)
-
iterator
public Iterator<Map.Entry<Key,Value>> iterator(Transaction tx, long pos) throws IOException
- Throws:
IOException
-
iterator
public Iterator<Map.Entry<Key,Value>> iterator(Transaction tx) throws IOException
- Throws:
IOException
-
clear
public void clear(Transaction tx) throws IOException
- Throws:
IOException
-
contains
public boolean contains(Transaction tx, Key key)
-
getPageId
public long getPageId()
-
getNext
public long getNext()
-
setNext
public void setNext(long next)
-
isHead
public boolean isHead()
-
isTail
public boolean isTail()
-
size
public int size(Transaction tx)
-
-