|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.obsearch.index.bucket.impl.AbstractBucketContainerDouble<O,B>
public abstract class AbstractBucketContainerDouble<O extends OBDouble,B extends BucketObjectDouble>
AbstractBucketContainerDouble 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 | |
---|---|
AbstractBucketContainerDouble(Index<O> index,
int pivots,
OBStore<TupleBytes> storage,
byte[] key)
Build a new container for doubles over the given index, with the given pivot number and a certain storage device where all the smap vectors are stored. |
|
AbstractBucketContainerDouble(Index<O> index,
int pivots,
OBStore<TupleBytes> storage,
byte[] key,
int secondaryIndexPivot)
Build a new container for doubles 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(OBQueryDouble<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(OBQueryDouble<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(OBQueryDouble<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 AbstractBucketContainerDouble(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 containerpublic AbstractBucketContainerDouble(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 OBDouble,B extends BucketObjectDouble,OBQueryDouble<O extends OBDouble>>
protected abstract B instantiateBucketObject()
public void setPivots(int pivots)
BucketContainer
setPivots
in interface BucketContainer<O extends OBDouble,B extends BucketObjectDouble,OBQueryDouble<O extends OBDouble>>
public OperationStatus delete(B bucket, O object) throws OBException, IllegalIdException, IllegalAccessException, InstantiationException
BucketContainer
BucketContainer
.
delete
in interface BucketContainer<O extends OBDouble,B extends BucketObjectDouble,OBQueryDouble<O extends OBDouble>>
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 OBDouble,B extends BucketObjectDouble,OBQueryDouble<O extends OBDouble>>
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 OBDouble,B extends BucketObjectDouble,OBQueryDouble<O extends OBDouble>>
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 OBDouble,B extends BucketObjectDouble,OBQueryDouble<O extends OBDouble>>
bucket
- The bucket associated to objectobject
- The object that will be inserted
OBException
IllegalIdException
IllegalAccessException
InstantiationException
public void search(OBQueryDouble<O> query, B b, ByteBuffer data, Filter<O> filter, Statistics stats) throws IllegalAccessException, OBException, InstantiationException, IllegalIdException
BucketContainer
search
in interface BucketContainer<O extends OBDouble,B extends BucketObjectDouble,OBQueryDouble<O extends OBDouble>>
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
BucketContainer
BucketContainer.search(AbstractOBQuery, BucketObject, Filter, Statistics)
but
it forces the query AbstractOBQuery
search
in interface BucketContainer<O extends OBDouble,B extends BucketObjectDouble,OBQueryDouble<O extends OBDouble>>
IllegalAccessException
OBException
IllegalIdException
InstantiationException
public void search(OBQueryDouble<O> query, B b, Filter<O> filter, Statistics stats) throws IllegalAccessException, OBException, InstantiationException, IllegalIdException
search
in interface BucketContainer<O extends OBDouble,B extends BucketObjectDouble,OBQueryDouble<O extends OBDouble>>
query
- b
- filter
- Filter to be employed.
IllegalAccessException
DatabaseException
OBException
InstantiationException
IllegalIdException
public void search(OBQueryDouble<O> query, B b, Filter<O> filter, byte[] key1, byte[] key2, Statistics stats) throws IllegalAccessException, OBException, InstantiationException, IllegalIdException
IllegalAccessException
OBException
InstantiationException
IllegalIdException
public int getPivots()
BucketContainer
getPivots
in interface BucketContainer<O extends OBDouble,B extends BucketObjectDouble,OBQueryDouble<O extends OBDouble>>
public int size() throws OBException
size
in interface BucketContainer<O extends OBDouble,B extends BucketObjectDouble,OBQueryDouble<O extends OBDouble>>
OBException
public void setKey(byte[] key)
BucketContainer
setKey
in interface BucketContainer<O extends OBDouble,B extends BucketObjectDouble,OBQueryDouble<O extends OBDouble>>
public byte[] serialize()
BucketContainer
serialize
in interface BucketContainer<O extends OBDouble,B extends BucketObjectDouble,OBQueryDouble<O extends OBDouble>>
public boolean isModified()
BucketContainer
isModified
in interface BucketContainer<O extends OBDouble,B extends BucketObjectDouble,OBQueryDouble<O extends OBDouble>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |