messif.buckets
Class OrderedLocalBucket<C>
java.lang.Object
messif.buckets.Bucket
messif.buckets.LocalBucket
messif.buckets.OrderedLocalBucket<C>
- Type Parameters:
C
- type of the keys that this bucket's objects are ordered by
- All Implemented Interfaces:
- java.io.Serializable, ObjectProvider<LocalAbstractObject>
- Direct Known Subclasses:
- DiskBlockObjectKeyBucket, DiskBlockObjectKeyMemoryBucket, MemoryStorageIDBucket, MemoryStorageLocatorBucket, MemoryStorageNoDupsBucket, MemoryStorageObjectKeyBucket, VirtualStorageBucket
public abstract class OrderedLocalBucket<C>
- extends LocalBucket
An extension of LocalBucket
that maintains the stored objects in
a certain order.
- See Also:
- Serialized Form
Constructor Summary |
protected |
OrderedLocalBucket(long capacity,
long softCapacity,
long lowOccupation,
boolean occupationAsBytes)
Constructs a new LocalBucket instance and setups all bucket limits |
Methods inherited from class messif.buckets.LocalBucket |
addObject, addObject, addObjectErrCode, deleteAllObjects, deleteObject, deleteObject, deleteObject, deregisterFilter, destroy, finalize, getAllObjects, getBucketID, getCapacity, getFilter, getLowOccupation, getObject, getObject, getObject, getObjectCount, getOccupation, getOccupationRatio, getSoftCapacity, isBucketStandalone, isSoftCapacityExceeded, registerFilter, setLowOccupation, setSoftCapacity, toString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OrderedLocalBucket
protected OrderedLocalBucket(long capacity,
long softCapacity,
long lowOccupation,
boolean occupationAsBytes)
- Constructs a new LocalBucket instance and setups all bucket limits
- Parameters:
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 objects
getIndex
public OrderedIndex<C,LocalAbstractObject> getIndex()
- Description copied from class:
LocalBucket
- Returns the index defined on this bucket that can be used for searching.
- Overrides:
getIndex
in class LocalBucket
- Returns:
- the index for this bucket
getModifiableIndex
protected abstract ModifiableOrderedIndex<C,LocalAbstractObject> getModifiableIndex()
- Description copied from class:
LocalBucket
- Returns the index (including storage) for this bucket.
The index provides the access to the underlying storage of objects in this bucket.
- Specified by:
getModifiableIndex
in class LocalBucket
- Returns:
- the index for this bucket