|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.obsearch.index.bucket.impl.AbstractBucketContainerLong<O,B>
public abstract class AbstractBucketContainerLong<O extends OBLong,B extends BucketObjectLong>
AbstractBucketContainerLong Holds the functionality of a bucket that sorts its smap-vectors lexicographically. Binary searches are employed inside the vector.
| Field Summary | |
|---|---|
protected byte[] |
key
Iterate only through this key. |
| Constructor Summary | |
|---|---|
AbstractBucketContainerLong(Index<O> index,
int pivots,
OBStore<TupleBytes> storage,
byte[] key)
Build a new container for longs over the given index, with the given pivot number and a certain storage device where all the smap vectors are stored. |
|
AbstractBucketContainerLong(Index<O> index,
int pivots,
OBStore<TupleBytes> storage,
byte[] key,
int secondaryIndexPivot)
Build a new container for longs over the given index, with the given pivot number and a certain storage device where all the smap vectors are stored. |
|
| Method Summary | |
|---|---|
OperationStatus |
delete(B bucket,
O object)
Deletes the given object from this BucketContainer. |
OperationStatus |
exists(B bucket,
O object)
Returns true if the object and its bucket definition exist in this container |
List<B> |
getObjects()
Return the object list! |
int |
getPivots()
# of pivots for this container. |
OperationStatus |
insert(B bucket,
O object)
Insert the given bucket into the container. |
OperationStatus |
insertBulk(B bucket,
O object)
Insert the given bucket into the container. |
protected abstract B |
instantiateBucketObject()
Instantiate a new Bucket ready to process each record. |
boolean |
isModified()
Return true if the bucket has been modified since it was instantiated. |
void |
search(AbstractOBQuery<O> q,
B bucket,
Filter<O> filter,
Statistics stats)
Same as BucketContainer.search(AbstractOBQuery, BucketObject, Filter, Statistics) but
it forces the query AbstractOBQuery |
void |
search(OBQueryLong<O> query,
B b,
ByteBuffer data,
Filter<O> filter,
Statistics stats)
Match the given query and bucket but only for one record found in b. |
void |
search(OBQueryLong<O> query,
B b,
Filter<O> filter,
byte[] key1,
byte[] key2,
Statistics stats)
Convenience method that forces the search to be performed on a certain key set. |
void |
search(OBQueryLong<O> query,
B b,
Filter<O> filter,
Statistics stats)
Searches the data by using a binary search to reduce SMAP vector computations. |
byte[] |
serialize()
Serialize the bucket |
void |
setKey(byte[] key)
Sets the key (bucket id) of a bucket container |
void |
setPivots(int pivots)
Sets the # of pivots for this container. |
int |
size()
Return the # of S-Map vectors in the bucket. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected byte[] key
| Constructor Detail |
|---|
public AbstractBucketContainerLong(Index<O> index,
int pivots,
OBStore<TupleBytes> storage,
byte[] key)
index - Underlying index.pivots - Number of pivots employedstorage - Storage device where the smap vectors are stored.key - Base key of this container
public AbstractBucketContainerLong(Index<O> index,
int pivots,
OBStore<TupleBytes> storage,
byte[] key,
int secondaryIndexPivot)
index - Underlying index.pivots - Number of pivots employedstorage - Storage device where the smap vectors are stored.key - Base key of this containersecondaryIndexPivot - Sort records by this dimension.| Method Detail |
|---|
public List<B> getObjects()
getObjects in interface BucketContainer<O extends OBLong,B extends BucketObjectLong,OBQueryLong<O extends OBLong>>protected abstract B instantiateBucketObject()
public void setPivots(int pivots)
BucketContainer
setPivots in interface BucketContainer<O extends OBLong,B extends BucketObjectLong,OBQueryLong<O extends OBLong>>
public OperationStatus delete(B bucket,
O object)
throws OBException,
IllegalIdException,
IllegalAccessException,
InstantiationException
BucketContainerBucketContainer.
delete in interface BucketContainer<O extends OBLong,B extends BucketObjectLong,OBQueryLong<O extends OBLong>>bucket - This will should match this bucket's id. Used to pass
additional information such as the SMAP vectorobject - The object that will be deleted.
Status.OK and the deleted object's id if the
object was found and successfully deleted.
Status.NOT_EXISTS if the object is not in
the database.
OBException
IllegalIdException
IllegalAccessException
InstantiationException
public OperationStatus insert(B bucket,
O object)
throws OBException,
IllegalIdException,
IllegalAccessException,
InstantiationException
insert in interface BucketContainer<O extends OBLong,B extends BucketObjectLong,OBQueryLong<O extends OBLong>>bucket - Bucket to insert.object - the bucket has an object.
OBException
IllegalIdException
IllegalAccessException
InstantiationException
public OperationStatus insertBulk(B bucket,
O object)
throws OBException,
IllegalIdException,
IllegalAccessException,
InstantiationException
insertBulk in interface BucketContainer<O extends OBLong,B extends BucketObjectLong,OBQueryLong<O extends OBLong>>bucket - Bucket to insert.object - the bucket has an object.
OBException
IllegalIdException
IllegalAccessException
InstantiationException
public OperationStatus exists(B bucket,
O object)
throws OBException,
IllegalIdException,
IllegalAccessException,
InstantiationException
BucketContainer
exists in interface BucketContainer<O extends OBLong,B extends BucketObjectLong,OBQueryLong<O extends OBLong>>bucket - The bucket associated to objectobject - The object that will be inserted
OBException
IllegalIdException
IllegalAccessException
InstantiationException
public void search(OBQueryLong<O> query,
B b,
ByteBuffer data,
Filter<O> filter,
Statistics stats)
throws IllegalAccessException,
OBException,
InstantiationException,
IllegalIdException
BucketContainer
search in interface BucketContainer<O extends OBLong,B extends BucketObjectLong,OBQueryLong<O extends OBLong>>query - The search parameters (range, priority queue with the closest
elements)b - The bucket of the given object.filter - Filter to be employed.
IllegalAccessException
OBException
InstantiationException
IllegalIdException
public void search(AbstractOBQuery<O> q,
B bucket,
Filter<O> filter,
Statistics stats)
throws IllegalAccessException,
OBException,
InstantiationException,
IllegalIdException
BucketContainerBucketContainer.search(AbstractOBQuery, BucketObject, Filter, Statistics) but
it forces the query AbstractOBQuery
search in interface BucketContainer<O extends OBLong,B extends BucketObjectLong,OBQueryLong<O extends OBLong>>IllegalAccessException
OBException
IllegalIdException
InstantiationException
public void search(OBQueryLong<O> query,
B b,
Filter<O> filter,
Statistics stats)
throws IllegalAccessException,
OBException,
InstantiationException,
IllegalIdException
search in interface BucketContainer<O extends OBLong,B extends BucketObjectLong,OBQueryLong<O extends OBLong>>query - b - filter - Filter to be employed.
IllegalAccessException
DatabaseException
OBException
InstantiationException
IllegalIdException
public void search(OBQueryLong<O> query,
B b,
Filter<O> filter,
byte[] key1,
byte[] key2,
Statistics stats)
throws IllegalAccessException,
OBException,
InstantiationException,
IllegalIdException
IllegalAccessException
OBException
InstantiationException
IllegalIdExceptionpublic int getPivots()
BucketContainer
getPivots in interface BucketContainer<O extends OBLong,B extends BucketObjectLong,OBQueryLong<O extends OBLong>>
public int size()
throws OBException
size in interface BucketContainer<O extends OBLong,B extends BucketObjectLong,OBQueryLong<O extends OBLong>>OBExceptionpublic void setKey(byte[] key)
BucketContainer
setKey in interface BucketContainer<O extends OBLong,B extends BucketObjectLong,OBQueryLong<O extends OBLong>>public byte[] serialize()
BucketContainer
serialize in interface BucketContainer<O extends OBLong,B extends BucketObjectLong,OBQueryLong<O extends OBLong>>public boolean isModified()
BucketContainer
isModified in interface BucketContainer<O extends OBLong,B extends BucketObjectLong,OBQueryLong<O extends OBLong>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||