|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.buckets.Bucket
messif.buckets.LocalBucket
messif.buckets.OrderedLocalBucket<C>
messif.buckets.impl.VirtualStorageBucket<C>
C
- type of the keys that this bucket's objects are ordered bypublic final class VirtualStorageBucket<C>
Encapsulating bucket for generic indices and storages.
Field Summary |
---|
Fields inherited from class messif.buckets.LocalBucket |
---|
counterBucketAddObject, counterBucketDelObject, counterBucketRead |
Constructor Summary | |
---|---|
VirtualStorageBucket(long capacity,
long softCapacity,
long lowOccupation,
boolean occupationAsBytes,
ModifiableOrderedIndex<C,LocalAbstractObject> index)
Constructs a new MemoryStorageBucket instance |
Method Summary | ||
---|---|---|
void |
destroy()
Destroy this bucket. |
|
void |
finalize()
Finalize this bucket. |
|
static VirtualStorageBucket<?> |
getBucket(long capacity,
long softCapacity,
long lowOccupation,
boolean occupationAsBytes,
java.util.Map<java.lang.String,java.lang.Object> parameters)
Creates a bucket. |
|
static
|
getBucket(long capacity,
long softCapacity,
long lowOccupation,
boolean occupationAsBytes,
Storage<LocalAbstractObject> storage,
IndexComparator<T,LocalAbstractObject> comparator)
Creates a bucket for the given storage and comparator. |
|
protected ModifiableOrderedIndex<C,LocalAbstractObject> |
getModifiableIndex()
Returns the index (including storage) for this bucket. |
Methods inherited from class messif.buckets.OrderedLocalBucket |
---|
getIndex |
Methods inherited from class messif.buckets.LocalBucket |
---|
addObject, addObject, addObjectErrCode, deleteAllObjects, deleteObject, deleteObject, deleteObject, deregisterFilter, getAllObjects, getBucketID, getCapacity, getFilter, getLowOccupation, getObject, getObject, getObject, getObjectCount, getOccupation, getOccupationRatio, getSoftCapacity, isBucketStandalone, isSoftCapacityExceeded, registerFilter, setLowOccupation, setSoftCapacity, toString |
Methods inherited from class messif.buckets.Bucket |
---|
addObjects, addObjects, deleteObject, deleteObjects, processQuery, provideObjects, split |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public VirtualStorageBucket(long capacity, long softCapacity, long lowOccupation, boolean occupationAsBytes, ModifiableOrderedIndex<C,LocalAbstractObject> index)
capacity
- maximal capacity of the bucket - cannot be exceededsoftCapacity
- maximal soft capacity of the bucketlowOccupation
- a minimal occupation for deleting objects - cannot be loweredoccupationAsBytes
- flag whether the occupation (and thus all the limits) are in bytes or number of objectsindex
- the index to encapsulateMethod Detail |
---|
public void finalize() throws java.lang.Throwable
LocalBucket
BucketDispatcher
when it is finalized.
finalize
in class LocalBucket
java.lang.Throwable
- if there was an error while cleaningpublic void destroy() throws java.lang.Throwable
LocalBucket
BucketDispatcher
when the bucket is removed
from the dispatcher.
destroy
in class LocalBucket
java.lang.Throwable
- if there was an error while cleaningprotected ModifiableOrderedIndex<C,LocalAbstractObject> getModifiableIndex()
LocalBucket
getModifiableIndex
in class OrderedLocalBucket<C>
public static VirtualStorageBucket<?> getBucket(long capacity, long softCapacity, long lowOccupation, boolean occupationAsBytes, java.util.Map<java.lang.String,java.lang.Object> parameters) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.ClassNotFoundException
IndexComparator
IndexComparator
LocalAbstractObjectOrder
If any of the comparatorInstance, comparatorClass, localAbstractObjectOrder is specified, an index is created using this comparator. Otherwise, the storage is used in internal order.
Note that additional parameters may be required according to the specified storageClass. See the documentation of that storage.
capacity
- maximal capacity of the bucket - cannot be exceededsoftCapacity
- maximal soft capacity of the bucketlowOccupation
- a minimal occupation for deleting objects - cannot be loweredoccupationAsBytes
- flag whether the occupation (and thus all the limits) are in bytes or number of objectsparameters
- list of named parameters (see above)
java.io.IOException
- if something goes wrong when working with the filesystem
java.lang.IllegalArgumentException
- if the parameters specified are invalid (non existent directory, null values, etc.)
java.lang.ClassNotFoundException
- if the parameter class could not be resolved or is not a descendant of LocalAbstractObjectpublic static <T> VirtualStorageBucket<T> getBucket(long capacity, long softCapacity, long lowOccupation, boolean occupationAsBytes, Storage<LocalAbstractObject> storage, IndexComparator<T,LocalAbstractObject> comparator) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.ClassNotFoundException
T
- type of the keys that the new bucket's objects will be ordered bycapacity
- maximal capacity of the bucket - cannot be exceededsoftCapacity
- maximal soft capacity of the bucketlowOccupation
- a minimal occupation for deleting objects - cannot be loweredoccupationAsBytes
- flag whether the occupation (and thus all the limits) are in bytes or number of objectsstorage
- the underlying storage for object persistencecomparator
- the comparator that imposes order on the indexed objects
java.io.IOException
- if something goes wrong when working with the filesystem
java.lang.IllegalArgumentException
- if the parameters specified are invalid (non existent directory, null values, etc.)
java.lang.ClassNotFoundException
- if the parameter class could not be resolved or is not a descendant of LocalAbstractObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |