com.bigdata.btree
Class IndexSegment.ImmutableNodeFactory.ImmutableNode

java.lang.Object
  extended by com.bigdata.btree.PO
      extended by com.bigdata.btree.AbstractNode<Node>
          extended by com.bigdata.btree.Node
              extended by com.bigdata.btree.IndexSegment.ImmutableNodeFactory.ImmutableNode
All Implemented Interfaces:
IAbstractNodeData, IChildData, IKeysData, INodeData, ISpannedTupleCountData, ITreeNodeData, IAbstractNode, IDirty, IIdentityAccess, IDataRecordAccess
Enclosing class:
IndexSegment.ImmutableNodeFactory

public static class IndexSegment.ImmutableNodeFactory.ImmutableNode
extends Node

Immutable node throws UnsupportedOperationException for the public mutator API but does not try to override all low-level mutation behaviors.

Version:
$Id: IndexSegment.java 5897 2012-01-27 17:45:20Z thompsonbry $
Author:
Bryan Thompson

Field Summary
 
Fields inherited from class com.bigdata.btree.AbstractNode
btree, INFO, log, parent, referenceCount, self
 
Fields inherited from class com.bigdata.btree.PO
deleted, dirty, identity
 
Fields inherited from interface com.bigdata.btree.IIdentityAccess
NULL
 
Constructor Summary
protected IndexSegment.ImmutableNodeFactory.ImmutableNode(AbstractBTree btree, long addr, INodeData data)
           
 
Method Summary
 void delete()
          Deletes the persistence capable object.
 Tuple insert(byte[] key, byte[] val, boolean deleted, long timestamp, Tuple tuple)
          Insert or update a value.
 Tuple remove(byte[] key, Tuple tuple)
          Recursive search locates the appropriate leaf and removes the entry for the key.
 
Methods inherited from class com.bigdata.btree.Node
childIterator, childIterator, data, dump, findChild, getChild, getChildAddr, getChildCount, getChildEntryCount, getChildRef, getDelegate, getIndexOf, getKeyCount, getKeys, getLeftSibling, getMaximumVersionTimestamp, getMinimumVersionTimestamp, getRightMostChild, getRightSibling, getSpannedTupleCount, hasVersionTimestamps, indexOf, insertChild, isCoded, isLeaf, isReadOnly, keyAt, lookup, maxKeys, merge, minKeys, postOrderIterator, postOrderNodeIterator, prefetchChildLeaves, prefetchRightSibling, rangeCheckChildIndex, rangeCheckSpannedTupleIndex, redistributeKeys, removeChild, split, toString, updateEntryCount, updateMinMaxVersionTimestamp, valueAt
 
Methods inherited from class com.bigdata.btree.AbstractNode
assertInvariants, assertKeysMonotonic, copyKey, copyOnWrite, copyOnWrite, dump, dump, entryIterator, getBranchingFactor, getParent, isLeftMostNode, isRightMostNode, join, keyAsString, postOrderNodeIterator, postOrderNodeIterator, rangeIterator
 
Methods inherited from class com.bigdata.btree.PO
getIdentity, indent, isDeleted, isDirty, isPersistent, setDirty, setIdentity, toShortString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexSegment.ImmutableNodeFactory.ImmutableNode

protected IndexSegment.ImmutableNodeFactory.ImmutableNode(AbstractBTree btree,
                                                          long addr,
                                                          INodeData data)
Parameters:
btree -
addr -
data -
Method Detail

delete

public void delete()
Description copied from interface: IIdentityAccess
Deletes the persistence capable object. Both transient and persistent objects may be logically deleted. If the object is persistent then its space on the store is deallocated.

Specified by:
delete in interface IIdentityAccess
Overrides:
delete in class Node

insert

public Tuple insert(byte[] key,
                    byte[] val,
                    boolean deleted,
                    long timestamp,
                    Tuple tuple)
Description copied from class: AbstractNode
Insert or update a value.

Overrides:
insert in class Node
Parameters:
key - The key (non-null).
val - The value (may be null).
deleted - true iff the entry is to marked as deleted (delete markers must be supported for if this is true).
timestamp - The timestamp associated with the version (the value is ignored unless version metadata is being maintained).
tuple - A tuple that may be used to obtain the data and metadata for the pre-existing index entry overwritten by the insert operation (optional).
Returns:
The tuple iff there was a pre-existing entry under that key and null otherwise.

remove

public Tuple remove(byte[] key,
                    Tuple tuple)
Description copied from class: AbstractNode
Recursive search locates the appropriate leaf and removes the entry for the key.

Note: It is an error to call this method if delete markers are in use.

Overrides:
remove in class Node
Parameters:
key - The search key.
tuple - A tuple that may be used to obtain the data and metadata for the pre-existing index entry that was either removed by the remove operation (optional).
Returns:
The tuple iff there was a pre-existing entry under that key and null otherwise.


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.