com.bigdata.btree
Interface IAutoboxBTree

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

public interface IAutoboxBTree

An interface defining non-batch methods for inserting, removing, lookup, and containment tests where keys and values are implicitly converted to and from byte[]s using the ITupleSerializer configured on the IndexMetadata object for the IIndex.

Version:
$Id: IAutoboxBTree.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
TODO:
Add generic parameters for the application key type and the application value type., Add IRangeQuery variants with automatic conversion of application keys to unsigned byte[] keys.

Method Summary
 boolean contains(Object key)
          Return true iff there is an entry for the key.
 Object insert(Object key, Object value)
          Insert with auto-magic handling of keys and value objects.
 Object lookup(Object key)
          Lookup a value for a key.
 Object remove(Object key)
          Remove the key and its associated value.
 

Method Detail

insert

Object insert(Object key,
              Object value)
Insert with auto-magic handling of keys and value objects.

Parameters:
key - The key is implicitly converted to an unsigned byte[].
value - The value is implicitly converted to a byte[].
Returns:
The de-serialized old value -or- null if there was no value stored under that key.

lookup

Object lookup(Object key)
Lookup a value for a key.

Parameters:
key - The key is implicitly converted to an unsigned byte[].
Returns:
The de-serialized value or null if there is no entry for that key.

contains

boolean contains(Object key)
Return true iff there is an entry for the key.

Parameters:
key - The key is implicitly converted to an unsigned byte[].
Returns:
True if the btree contains an entry for that key.

remove

Object remove(Object key)
Remove the key and its associated value.

Parameters:
key - The key is implicitly converted to an unsigned byte[].
Returns:
The de-serialized value stored under that key or null if the key was not found.


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