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 classListNode.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 ValueaddFirst(Transaction tx, Key key, Value value)voidclear(Transaction tx)booleancontains(Transaction tx, Key key)Valueget(Transaction tx, Key key)ListIndex<Key,Value>getContainingList()Map.Entry<Key,Value>getFirst(Transaction tx)Map.Entry<Key,Value>getLast(Transaction tx)longgetNext()Page<ListNode<Key,Value>>getPage()longgetPageId()booleanisEmpty(Transaction tx)booleanisHead()booleanisTail()Iterator<Map.Entry<Key,Value>>iterator(Transaction tx)Iterator<Map.Entry<Key,Value>>iterator(Transaction tx, long pos)Valueput(Transaction tx, Key key, Value value)voidsetContainingList(ListIndex<Key,Value> list)voidsetNext(long next)voidsetPage(Page<ListNode<Key,Value>> page)intsize(Transaction tx)voidstoreUpdate(Transaction tx)StringtoString()
-
-
-
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)
-
-