MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.sms.btree
Class InternalNodeArrayOffsetMap

java.lang.Object
  extended by ch.ethz.mxquery.sms.btree.InternalNodeArrayMap
      extended by ch.ethz.mxquery.sms.btree.InternalNodeArrayOffsetMap

public class InternalNodeArrayOffsetMap
extends InternalNodeArrayMap

holds offsets into file instead of BTreeNodes. same functionality as InternalNodeArrayMap. Watch out for *not to use* functions that make no sense since there are no InternalNodes but only offsets. Still they must be there to allow type hierarchy.


Constructor Summary
InternalNodeArrayOffsetMap(int n)
          Initiates the InternalNodeArrayMap
 
Method Summary
 void addAtPos(DeweyIdentifier key, int pos, java.lang.Long rightNode)
          Adds the given mapping at the given position in this array.
 void deleteAtPos(int pos)
          Deletes the key-node mapping at the given position.
 BTreeNode get(DeweyIdentifier key)
          Returns the node corresponding to the interval in which the provided key falls.
 java.lang.Long getNodeOffset(int pos)
           
 java.lang.Long getOffset(DeweyIdentifier key)
          Returns the offset of the node corresponding to the interval in which the provided key falls.
 void put(DeweyIdentifier key, java.lang.Long rightNode)
          Puts the given key to rightNode association in the node array map.
 InternalNodeArrayMap split()
          Splits this map, keeps entries from 0 to (mid-1) and returns a new map with entries from (mid+1) to (currentSize-1).
 java.lang.String toString()
           
 
Methods inherited from class ch.ethz.mxquery.sms.btree.InternalNodeArrayMap
addAtPos, binarySearch, delete, getIntervalPosition, getMidKey, put, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InternalNodeArrayOffsetMap

public InternalNodeArrayOffsetMap(int n)
Initiates the InternalNodeArrayMap

Method Detail

split

public InternalNodeArrayMap split()
Splits this map, keeps entries from 0 to (mid-1) and returns a new map with entries from (mid+1) to (currentSize-1). The key mid is no longer present in either map and thus should be promoted.

Overrides:
split in class InternalNodeArrayMap
Returns:
the right map

put

public void put(DeweyIdentifier key,
                java.lang.Long rightNode)
Puts the given key to rightNode association in the node array map.

Parameters:
key -
rightNode -

getOffset

public java.lang.Long getOffset(DeweyIdentifier key)
Returns the offset of the node corresponding to the interval in which the provided key falls.

Parameters:
key -
Returns:
the offset

getNodeOffset

public java.lang.Long getNodeOffset(int pos)

get

public BTreeNode get(DeweyIdentifier key)
Returns the node corresponding to the interval in which the provided key falls.

Overrides:
get in class InternalNodeArrayMap
Parameters:
key -
Returns:
the node for this key

deleteAtPos

public void deleteAtPos(int pos)
Deletes the key-node mapping at the given position.

Overrides:
deleteAtPos in class InternalNodeArrayMap
Parameters:
pos -

toString

public java.lang.String toString()
Overrides:
toString in class InternalNodeArrayMap

addAtPos

public void addAtPos(DeweyIdentifier key,
                     int pos,
                     java.lang.Long rightNode)
Adds the given mapping at the given position in this array.

Parameters:
key -
rightNode -
pos -

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich