public class MemoryStorageBucket extends LocalBucket implements java.io.Serializable
LocalBucket
.
It stores all objects in a memory storage
and no index is provided for the objects.BucketDispatcher
,
LocalBucket
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected ModifiableIndex<LocalAbstractObject> |
objects
Object storage
|
counterBucketAddObject, counterBucketDelObject, counterBucketRead
Constructor and Description |
---|
MemoryStorageBucket(long capacity,
long softCapacity,
long lowOccupation,
boolean occupationAsBytes)
Constructs a new MemoryStorageBucket instance.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy this bucket.
|
void |
finalize()
Finalize this 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
protected final ModifiableIndex<LocalAbstractObject> objects
public MemoryStorageBucket(long capacity, long softCapacity, long lowOccupation, boolean occupationAsBytes)
MemoryStorage
to actually strore the objects.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 objectsprotected ModifiableIndex<LocalAbstractObject> getModifiableIndex()
LocalBucket
getModifiableIndex
in class LocalBucket
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 cleaning