com.bigdata.btree
Interface ISimpleBTree

All Known Subinterfaces:
IClientIndex, IIndex, ILocalBTreeView, IScaleOutClientIndex
All Known Implementing Classes:
AbstractBTree, AbstractScaleOutClientIndexView, AbstractScaleOutClientIndexView2, BTree, ClientIndexView, ClientIndexViewRefactor, CommitRecordIndex, CommitTimeIndex, CounterSetBTree, DelegateIndex, EventReceiver.EventBTree, FusedView, IndexSegment, IndexSegmentIndex, IsolatedFusedView, JournalIndex, MetadataIndex, MetadataIndexView, Name2Addr, ReadCommittedView, ReadOnlyIndex, TxId2CommitTimeIndex, UnisolatedReadWriteIndex

public interface ISimpleBTree

Interface for non-batch operations on a B+-Tree mapping non-null variable length unsigned byte[] keys to arbitrary values.

Version:
$Id: ISimpleBTree.java 2265 2009-10-26 12:51:06Z thompsonbry $, $Id: ISimpleBTree.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson, Bryan Thompson
See Also:
UnicodeKeyBuilder, which may be used to encode one or more primitive data type values or Unicode strings into a variable length unsigned byte[] key.

Method Summary
 boolean contains(byte[] key)
          Return true iff there is a (non-deleted) index entry for the key.
 byte[] insert(byte[] key, byte[] value)
          Insert or update a value under the key.
 byte[] lookup(byte[] key)
          Lookup a value for a key.
 byte[] remove(byte[] key)
          Remove the key and its associated value.
 

Method Detail

insert

byte[] insert(byte[] key,
              byte[] value)
Insert or update a value under the key.

Parameters:
key - The key.
value - The value (may be null).
Returns:
The previous value under that key or null if the key was not found or if the previous entry for that key was marked as deleted.

lookup

byte[] lookup(byte[] key)
Lookup a value for a key.

Returns:
The value stored under that key or null if there is no entry for that key or if the entry under that key is marked as deleted.

contains

boolean contains(byte[] key)
Return true iff there is a (non-deleted) index entry for the key. An index entry with a null value will cause this method to return true. A deleted index entry will cause this method to return false.

Parameters:
key - The key.
Returns:
true if the index contains an (un-deleted) entry for that key.

remove

byte[] remove(byte[] key)
Remove the key and its associated value.

Parameters:
key - The key.
Returns:
The value stored under that key or null if the key was not found or if the previous entry under that key was marked as deleted.


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