messif.buckets
Class OrderedLocalBucket<C>

java.lang.Object
  extended by messif.buckets.Bucket
      extended by messif.buckets.LocalBucket
          extended by 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

Field Summary
 
Fields inherited from class messif.buckets.LocalBucket
counterBucketAddObject, counterBucketDelObject, counterBucketRead
 
Constructor Summary
protected OrderedLocalBucket(long capacity, long softCapacity, long lowOccupation, boolean occupationAsBytes)
          Constructs a new LocalBucket instance and setups all bucket limits
 
Method Summary
 OrderedIndex<C,LocalAbstractObject> getIndex()
          Returns the index defined on this bucket that can be used for searching.
protected abstract  ModifiableOrderedIndex<C,LocalAbstractObject> getModifiableIndex()
          Returns the index (including storage) for this bucket.
 
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 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

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 exceeded
softCapacity - maximal soft capacity of the bucket
lowOccupation - a minimal occupation for deleting objects - cannot be lowered
occupationAsBytes - flag whether the occupation (and thus all the limits) are in bytes or number of objects
Method Detail

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