ozone core API

org.ozoneDB.core.storage.gammaStore
Class IndexLeafNode

java.lang.Object
  extended byorg.ozoneDB.core.storage.gammaStore.IndexNode
      extended byorg.ozoneDB.core.storage.gammaStore.IndexLeafNode
All Implemented Interfaces:
java.io.Serializable, Storable

final class IndexLeafNode
extends IndexNode

Version:
$Id: IndexLeafNode.java,v 1.3 2004/01/27 21:28:53 leomekenkamp Exp $
Author:
Leo Mekenkamp (mind the anti sp@m)

Field Summary
private  ContainerLocationLoc containerLocationLoc
           
private static long serialVersionUID
           
 
Fields inherited from class org.ozoneDB.core.storage.gammaStore.IndexNode
log, LONGNULL, MAXOBJECTID, MINOBJECTID
 
Constructor Summary
(package private) IndexLeafNode(IndexManager indexManager)
           
 
Method Summary
(package private)  boolean existsContainerLocation(long objectId)
           
(package private)  ContainerLocation getContainerLocation(long objectId)
           
private  ContainerLocationLoc getContainerLocationLoc()
           
(package private)  long getMaxObjectId()
          Will enter in endless recursion if empty and next node is also empty; when a node becomes empty it will remove itself from the tree, so this is not a problem.
(package private)  long getMinObjectId()
          Returns the minimum object id that can be found be in this node
(package private)  void putContainerLocation(long objectId, ContainerLocation containerLocation)
           
private  void rawPutContainerLocation(long objectId, ContainerLocation containerLocation)
           
(package private)  ContainerLocation removeContainerLocation(long objectId)
           
protected  int size()
          Returns the number of elements in this node.
private  void split(long objectId, ContainerLocation containerLocation)
          Splits this instance into two nodes; the specified id is used to find out which container locations should remain in this instance, and which should be put in the other one.
 java.lang.String toString()
           
 
Methods inherited from class org.ozoneDB.core.storage.gammaStore.IndexNode
endInvoke, finalize, getIndexManager, getMaxSize, getNextNode, getNextNodeId, getNodeId, getParentNode, getParentNodeId, getPrevNode, getPrevNodeId, getStorageName, isDirty, isFull, isFull, isInvoked, nodeIdToStorageName, read, relSize, setDirty, setDirty, setIndexManager, setMaxSize, setNextNode, setNextNodeId, setParentNode, setParentNodeId, setPrevNode, setPrevNodeId, startInvoke, storageNameToNodeId
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

containerLocationLoc

private ContainerLocationLoc containerLocationLoc
Constructor Detail

IndexLeafNode

IndexLeafNode(IndexManager indexManager)
Method Detail

rawPutContainerLocation

private void rawPutContainerLocation(long objectId,
                                     ContainerLocation containerLocation)

putContainerLocation

void putContainerLocation(long objectId,
                          ContainerLocation containerLocation)

getContainerLocation

ContainerLocation getContainerLocation(long objectId)
Throws:
org.ozoneDB.ObjectNotFoundException - when given id not found

existsContainerLocation

boolean existsContainerLocation(long objectId)

removeContainerLocation

ContainerLocation removeContainerLocation(long objectId)
Throws:
org.ozoneDB.ObjectNotFoundException - when given id not found

size

protected int size()
Description copied from class: IndexNode
Returns the number of elements in this node.

Specified by:
size in class IndexNode
Returns:
number of elements in this node

getContainerLocationLoc

private ContainerLocationLoc getContainerLocationLoc()

getMaxObjectId

long getMaxObjectId()
Will enter in endless recursion if empty and next node is also empty; when a node becomes empty it will remove itself from the tree, so this is not a problem.

Specified by:
getMaxObjectId in class IndexNode

getMinObjectId

long getMinObjectId()
Description copied from class: IndexNode
Returns the minimum object id that can be found be in this node

Specified by:
getMinObjectId in class IndexNode

split

private void split(long objectId,
                   ContainerLocation containerLocation)
Splits this instance into two nodes; the specified id is used to find out which container locations should remain in this instance, and which should be put in the other one. Say we have a full node with object ids [10, 20, 30, 40, 50] and we are adding 35, then we would split into [10, 20, 30] and [40, 50].


toString

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

ozone core API

Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.