public final class PlainStorageBucket extends LocalBucket
counterBucketAddObject, counterBucketDelObject, counterBucketRead
Constructor and Description |
---|
PlainStorageBucket(long capacity,
long softCapacity,
long lowOccupation,
boolean occupationAsBytes,
ModifiableIndex<LocalAbstractObject> index)
Creates a new instance of PlainStorageBucket.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy this bucket.
|
void |
finalize()
Finalize this bucket.
|
static PlainStorageBucket |
getBucket(long capacity,
long softCapacity,
long lowOccupation,
boolean occupationAsBytes,
java.util.Map<java.lang.String,java.lang.Object> parameters)
Creates a bucket.
|
protected ModifiableIndex<LocalAbstractObject> |
getModifiableIndex()
Returns the index (including storage) for this bucket.
|
addObject, addObject, addObjectErrCode, deleteAllObjects, deleteObject, deleteObject, deleteObject, deleteObjects, deregisterFilter, getAllObjects, getBucketID, getCapacity, getFilter, getIndex, getLowOccupation, getObject, getObject, getObjectCount, getOccupation, getOccupationRatio, getSoftCapacity, isBucketStandalone, isSoftCapacityExceeded, registerFilter, setLowOccupation, setSoftCapacity, toString
addObjects, addObjects, deleteObject, deleteObject, processQuery, provideObjects, split
public PlainStorageBucket(long capacity, long softCapacity, long lowOccupation, boolean occupationAsBytes, ModifiableIndex<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 encapsulatepublic 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 ModifiableIndex<LocalAbstractObject> getModifiableIndex()
LocalBucket
getModifiableIndex
in class LocalBucket
public static PlainStorageBucket 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
StorageIndexed
)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 filesystemjava.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