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

java.lang.Object
  extended by org.apache.kahadb.index.ListNode<Key,Value>

public final class ListNode<Key,Value>
extends java.lang.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()
           
 java.util.Map.Entry<Key,Value> getFirst(Transaction tx)
           
 java.util.Map.Entry<Key,Value> getLast(Transaction tx)
           
 long getNext()
           
 Page<ListNode<Key,Value>> getPage()
           
 long getPageId()
           
 boolean isEmpty(Transaction tx)
           
 boolean isHead()
           
 boolean isTail()
           
 java.util.Iterator<java.util.Map.Entry<Key,Value>> iterator(Transaction tx)
           
 java.util.Iterator<java.util.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)
           
 java.lang.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 java.io.IOException
Throws:
java.io.IOException

addFirst

public Value addFirst(Transaction tx,
                      Key key,
                      Value value)
               throws java.io.IOException
Throws:
java.io.IOException

storeUpdate

public void storeUpdate(Transaction tx)
                 throws java.io.IOException
Throws:
java.io.IOException

get

public Value get(Transaction tx,
                 Key key)

isEmpty

public boolean isEmpty(Transaction tx)

getFirst

public java.util.Map.Entry<Key,Value> getFirst(Transaction tx)

getLast

public java.util.Map.Entry<Key,Value> getLast(Transaction tx)

iterator

public java.util.Iterator<java.util.Map.Entry<Key,Value>> iterator(Transaction tx,
                                                                   long pos)
                                                            throws java.io.IOException
Throws:
java.io.IOException

iterator

public java.util.Iterator<java.util.Map.Entry<Key,Value>> iterator(Transaction tx)
                                                            throws java.io.IOException
Throws:
java.io.IOException

clear

public void clear(Transaction tx)
           throws java.io.IOException
Throws:
java.io.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005-2012. All Rights Reserved.