org.apache.activemq.store.kahadb.disk.index
Class ListNode<Key,Value>

java.lang.Object
  extended by 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
static class ListNode.NodeMarshaller<Key,Value>
          The Marshaller is used to store and load the data in the ListNode into a Page.
 
Constructor Summary
ListNode()
           
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ListNode

public ListNode()
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()

getPage

public Page<ListNode<Key,Value>> getPage()

setPage

public void setPage(Page<ListNode<Key,Value>> page)

getNext

public long getNext()

setNext

public void setNext(long next)

setContainingList

public void setContainingList(ListIndex<Key,Value> list)

getContainingList

public ListIndex<Key,Value> getContainingList()

isHead

public boolean isHead()

isTail

public boolean isTail()

size

public int size(Transaction tx)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.