messif.buckets
Class BucketDispatcher

java.lang.Object
  extended by messif.buckets.BucketDispatcher
All Implemented Interfaces:
java.io.Serializable

public class BucketDispatcher
extends java.lang.Object
implements java.io.Serializable

This class is a dispatcher for maintaining a set of local buckets. Kept buckets can be accessed using unique bucket identifiers (BIDs). New buckets can be created using the createBucket(java.lang.Class, long, long, long, boolean, java.util.Map) method - the unique ID is assigned automatically. To create a bucket, a specific bucket implementation class, capacity settings and additional class-specific parameters are needed. They are either passed to the createBucket method, or the dispatcher's default values are used. Automatic pivot choosers can be created for new buckets - see setAutoPivotChooser(java.lang.Class). To remove a bucket from the dispatcher, use removeBucket(int, boolean). Note that objects remain inside the bucket, just the bucket will be no longer maintained by this dispatcher.

See Also:
LocalBucket, Serialized Form

Field Summary
protected  java.lang.Class<? extends AbstractPivotChooser> autoPivotChooserClass
          The class of pivot chooser that is automatically created for newly created buckets
protected  AbstractPivotChooser autoPivotChooserInstance
          The pivot chooser instance that chooses pivots for all the buckets in this dispatcher
protected  long bucketCapacity
          Default bucket hard capacity for newly created buckets
protected  long bucketLowOccupation
          Default bucket hard low-occupation for newly created buckets
protected  boolean bucketOccupationAsBytes
          Default flag whether to store occupation & capacity in bytes (true) or number of objects (false) for newly created buckets
protected  long bucketSoftCapacity
          Default bucket soft capacity for newly created buckets
protected  java.util.Map<LocalBucket,AbstractPivotChooser> createdPivotChoosers
          The hash table of pivot choosers that are assigned to buckets of this dispatcher
protected  java.lang.Class<? extends LocalBucket> defaultBucketClass
          Default class for newly created buckets
protected  java.util.Map<java.lang.String,java.lang.Object> defaultBucketClassParams
          Default parameters for newly created buckets with default bucket class
protected static java.util.logging.Logger log
          Logger for the bucket dispatcher
static int UNASSIGNED_BUCKET_ID
          The ID of buckets that do not belong to a dispatcher
 
Constructor Summary
BucketDispatcher(int maxBuckets, long bucketCapacity, java.lang.Class<? extends LocalBucket> defaultBucketClass)
          Creates a new instance of BucketDispatcher only with maximal capacity specification.
BucketDispatcher(int maxBuckets, long bucketCapacity, long bucketSoftCapacity, long bucketLowOccupation, boolean bucketOccupationAsBytes, java.lang.Class<? extends LocalBucket> defaultBucketClass)
          Creates a new instance of BucketDispatcher with full specification of default values.
BucketDispatcher(int maxBuckets, long bucketCapacity, long bucketSoftCapacity, long bucketLowOccupation, boolean bucketOccupationAsBytes, java.lang.Class<? extends LocalBucket> defaultBucketClass, java.util.Map<java.lang.String,java.lang.Object> defaultBucketClassParams)
          Creates a new instance of BucketDispatcher with full specification of default values.
 
Method Summary
 LocalBucket addBucket(LocalBucket bucket)
          Add an existing bucket to this dispatcher.
protected  AbstractPivotChooser createAutoPivotChooser(LocalBucket bucket)
          Creates a new pivot chooser for the provided bucket.
 LocalBucket createBucket()
          Create new local bucket with the default storage class and default storage capacity.
 LocalBucket createBucket(java.lang.Class<? extends LocalBucket> storageClass)
          Create new local bucket with specified storage class and default storage capacity.
static LocalBucket createBucket(java.lang.Class<? extends LocalBucket> storageClass, long capacity, long softCapacity, long lowOccupation, boolean occupationAsBytes, java.util.Map<java.lang.String,java.lang.Object> storageClassParams)
          Create new local bucket with specified storage class and storage capacity (different from default values).
 LocalBucket createBucket(java.lang.Class<? extends LocalBucket> storageClass, java.util.Map<java.lang.String,java.lang.Object> storageClassParams)
          Create new local bucket with specified storage class and default storage capacity.
 LocalBucket createBucket(java.lang.Class<? extends LocalBucket> storageClass, java.util.Map<java.lang.String,java.lang.Object> storageClassParams, long capacity, long softCapacity, long lowOccupation)
          Create new local bucket with specified storage class and storage capacity (different from default values).
 LocalBucket createBucket(long capacity, long softCapacity, long lowOccupation)
          Create new local bucket with default storage class and specified storage capacity.
 void destroy()
          Destroys all buckets managed by this dispatcher.
 void finalize()
          Finalize all buckets managed by this dispatcher.
 java.util.Set<java.lang.Integer> getAllBucketIDs()
          Returns the set of bucket IDs maintaned by this dispatcher.
 java.util.Collection<LocalBucket> getAllBuckets()
          Returns the collection of all buckets maintained by this dispatcher.
 AbstractPivotChooser getAutoPivotChooser(int bucketID)
          Returns pivot chooser that was automatically created for a bucket of this dispatcher.
 java.lang.Class<? extends AbstractPivotChooser> getAutoPivotChooserClass()
          Returns the class of the pivot chooser that is currently used for buckets in this dispatcher.
 LocalBucket getBucket(int bucketID)
          Returns the bucket with the specified ID.
 long getBucketCapacity()
          Returns the default hard capactity limit for new buckets.
 int getBucketCount()
          Returns the actual number of buckets maintained by this dispatcher.
 long getBucketLowOccupation()
          Returns the default hard low-occupation capactity limit for new buckets.
 boolean getBucketOccupationAsBytes()
          Returns the default flag whether to compute occupation & capacity in bytes (true) or number of objects (false) for new buckets.
 long getBucketSoftCapacity()
          Returns the default soft capactity limit for new buckets.
 java.lang.Class<? extends LocalBucket> getDefaultBucketClass()
          Returns the default class for newly created buckets.
 java.util.Map<java.lang.String,java.lang.Object> getDefaultBucketClassParams()
          Returns the default parameters for newly created buckets with default bucket class.
 int getObjectCount()
          Returns the sum of object counts stored in all buckets maintained by this dispatcher.
 long getOccupation()
          Returns the sum of occupations of all buckets maintained by this dispatcher.
 int getOverloadedBucketCount()
          Returns number of buckets that exceed their soft-capacities.
 LocalBucket moveBucket(int bucketID, BucketDispatcher targetDispatcher)
          Move the bucket with the specified ID to another dispatcher.
 void removeBucket(int bucketID)
          Delete the bucket with specified ID from this dispatcher.
 LocalBucket removeBucket(int bucketID, boolean destroyBucket)
          Delete the bucket with specified ID from this dispatcher.
 void setAllBucketLowOccupation(long bucketLowOccupation)
          Set the low occupattion for all buckets registered by this dispatcher.
 void setAllBucketSoftCapacity(long bucketSoftCapacity)
          Set the soft capacity for all buckets registered by this dispatcher.
 void setAutoPivotChooser(AbstractPivotChooser autoPivotChooserInstance)
          Set the pivot chooser instance that chooses pivots for all the buckets in this dispatcher.
 void setAutoPivotChooser(java.lang.Class<? extends AbstractPivotChooser> autoPivotChooserClass)
          Set the class of pivot chooser that will be created whenever a bucket is created by this dispatcher.
 void setBucketCapacity(long bucketCapacity)
          Set bucket capacity for all new buckets.
 void setBucketLowOccupation(long bucketLowOccupation)
          Set param "low occupeation" for all new buckets
 void setBucketOccupationAsBytes(boolean bucketOccupationAsBytes)
          Set param bucketOccupationAsBytes for all new buckets.
 void setBucketSoftCapacity(long bucketSoftCapacity)
          Set new soft capacity for all new buckets.
 void setDefaultBucketClass(java.lang.Class<? extends LocalBucket> defaultBucketClass)
          Set default class for all new buckets
 void setDefaultBucketClassParams(java.util.Map<java.lang.String,java.lang.Object> defaultBucketClassParams)
          New parameters for all new default buckets
 java.lang.String toString()
          Returns information about storage maintained by this dispatcher.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static java.util.logging.Logger log
Logger for the bucket dispatcher


UNASSIGNED_BUCKET_ID

public static final int UNASSIGNED_BUCKET_ID
The ID of buckets that do not belong to a dispatcher

See Also:
Constant Field Values

bucketCapacity

protected long bucketCapacity
Default bucket hard capacity for newly created buckets


bucketSoftCapacity

protected long bucketSoftCapacity
Default bucket soft capacity for newly created buckets


bucketLowOccupation

protected long bucketLowOccupation
Default bucket hard low-occupation for newly created buckets


bucketOccupationAsBytes

protected boolean bucketOccupationAsBytes
Default flag whether to store occupation & capacity in bytes (true) or number of objects (false) for newly created buckets


defaultBucketClass

protected java.lang.Class<? extends LocalBucket> defaultBucketClass
Default class for newly created buckets


defaultBucketClassParams

protected java.util.Map<java.lang.String,java.lang.Object> defaultBucketClassParams
Default parameters for newly created buckets with default bucket class


autoPivotChooserClass

protected java.lang.Class<? extends AbstractPivotChooser> autoPivotChooserClass
The class of pivot chooser that is automatically created for newly created buckets


autoPivotChooserInstance

protected AbstractPivotChooser autoPivotChooserInstance
The pivot chooser instance that chooses pivots for all the buckets in this dispatcher


createdPivotChoosers

protected final java.util.Map<LocalBucket,AbstractPivotChooser> createdPivotChoosers
The hash table of pivot choosers that are assigned to buckets of this dispatcher

Constructor Detail

BucketDispatcher

public BucketDispatcher(int maxBuckets,
                        long bucketCapacity,
                        long bucketSoftCapacity,
                        long bucketLowOccupation,
                        boolean bucketOccupationAsBytes,
                        java.lang.Class<? extends LocalBucket> defaultBucketClass,
                        java.util.Map<java.lang.String,java.lang.Object> defaultBucketClassParams)
Creates a new instance of BucketDispatcher with full specification of default values.

Parameters:
maxBuckets - the maximal number of buckets maintained by this dispatcher
bucketCapacity - the default bucket hard capacity for newly created buckets
bucketSoftCapacity - the default bucket soft capacity for newly created buckets
bucketLowOccupation - the default bucket hard low-occupation for newly created buckets
bucketOccupationAsBytes - the default flag whether to store occupation & capacity in bytes (true) or number of objects (false) for newly create buckets
defaultBucketClass - the default class for newly created buckets
defaultBucketClassParams - the default parameters for newly created buckets with default bucket class

BucketDispatcher

public BucketDispatcher(int maxBuckets,
                        long bucketCapacity,
                        long bucketSoftCapacity,
                        long bucketLowOccupation,
                        boolean bucketOccupationAsBytes,
                        java.lang.Class<? extends LocalBucket> defaultBucketClass)
Creates a new instance of BucketDispatcher with full specification of default values. No additional parameters for the default bucket class are specified.

Parameters:
maxBuckets - the maximal number of buckets maintained by this dispatcher
bucketCapacity - the default bucket hard capacity for newly created buckets
bucketSoftCapacity - the default bucket soft capacity for newly created buckets
bucketLowOccupation - the default bucket hard low-occupation for newly created buckets
bucketOccupationAsBytes - the default flag whether to store occupation & capacity in bytes (true) or number of objects (false) for newly create buckets
defaultBucketClass - the default class for newly created buckets

BucketDispatcher

public BucketDispatcher(int maxBuckets,
                        long bucketCapacity,
                        java.lang.Class<? extends LocalBucket> defaultBucketClass)
Creates a new instance of BucketDispatcher only with maximal capacity specification. The soft capacity and low-occupation limits are not set. The occupation and capacity is counted in bytes.

Parameters:
maxBuckets - the maximal number of buckets maintained by this dispatcher
bucketCapacity - the default bucket hard capacity for newly created buckets
defaultBucketClass - the default class for newly created buckets
Method Detail

finalize

public void finalize()
              throws java.lang.Throwable
Finalize all buckets managed by this dispatcher.

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable - if there was an error during releasing resources

destroy

public void destroy()
             throws java.lang.Throwable
Destroys all buckets managed by this dispatcher.

Throws:
java.lang.Throwable - if there was an error during destroying buckets

getAutoPivotChooser

public AbstractPivotChooser getAutoPivotChooser(int bucketID)
Returns pivot chooser that was automatically created for a bucket of this dispatcher.

Parameters:
bucketID - the ID of the bucket for which to get the pivot chooser
Returns:
pivot chooser that was automatically created for the specified bucket

setAutoPivotChooser

public void setAutoPivotChooser(java.lang.Class<? extends AbstractPivotChooser> autoPivotChooserClass)
                         throws java.lang.IllegalArgumentException
Set the class of pivot chooser that will be created whenever a bucket is created by this dispatcher.

Parameters:
autoPivotChooserClass - the class of the pivot chooser to create
Throws:
java.lang.IllegalArgumentException - if the specified class is abstract or does not have a public nullary constructor

setAutoPivotChooser

public void setAutoPivotChooser(AbstractPivotChooser autoPivotChooserInstance)
Set the pivot chooser instance that chooses pivots for all the buckets in this dispatcher.

Parameters:
autoPivotChooserInstance - the pivot chooser instance

getAutoPivotChooserClass

public java.lang.Class<? extends AbstractPivotChooser> getAutoPivotChooserClass()
Returns the class of the pivot chooser that is currently used for buckets in this dispatcher.

Returns:
the class of the pivot chooser that is currently used for buckets in this dispatcher

createAutoPivotChooser

protected AbstractPivotChooser createAutoPivotChooser(LocalBucket bucket)
Creates a new pivot chooser for the provided bucket. If the class for autoPivotChooser was specified, a new instance is created, otherwise the pivot chooser instance for the whole dispatcher is used. The specified bucket is registered as sample set provider for the pivot chooser The bucket is also associated with the chooser, so that the getAutoPivotChooser(int) will return it for the bucket.

Parameters:
bucket - the bucket for which to create pivot chooser
Returns:
the newly created pivot chooser or the whole dispatcher's pivot chooser instance; null is returned if either the class/instance of autoPivotChooser is not specified in this dispatcher or there was an error creating a new pivot chooser

setBucketCapacity

public void setBucketCapacity(long bucketCapacity)
Set bucket capacity for all new buckets.

Parameters:
bucketCapacity - new hard capacity.

setBucketLowOccupation

public void setBucketLowOccupation(long bucketLowOccupation)
Set param "low occupeation" for all new buckets

Parameters:
bucketLowOccupation - new low occupation.

setBucketOccupationAsBytes

public void setBucketOccupationAsBytes(boolean bucketOccupationAsBytes)
Set param bucketOccupationAsBytes for all new buckets.

Parameters:
bucketOccupationAsBytes - new value for param bucketOccupationAsBytes.

setBucketSoftCapacity

public void setBucketSoftCapacity(long bucketSoftCapacity)
Set new soft capacity for all new buckets.

Parameters:
bucketSoftCapacity - new soft capacity param

setDefaultBucketClass

public void setDefaultBucketClass(java.lang.Class<? extends LocalBucket> defaultBucketClass)
Set default class for all new buckets

Parameters:
defaultBucketClass - new bucket default class.

setDefaultBucketClassParams

public void setDefaultBucketClassParams(java.util.Map<java.lang.String,java.lang.Object> defaultBucketClassParams)
New parameters for all new default buckets

Parameters:
defaultBucketClassParams - new params for default buckets

setAllBucketSoftCapacity

public void setAllBucketSoftCapacity(long bucketSoftCapacity)
Set the soft capacity for all buckets registered by this dispatcher.

Parameters:
bucketSoftCapacity - new bucket soft capacity for the existing buckets

setAllBucketLowOccupation

public void setAllBucketLowOccupation(long bucketLowOccupation)
Set the low occupattion for all buckets registered by this dispatcher.

Parameters:
bucketLowOccupation - new low occupation.

getBucketCapacity

public long getBucketCapacity()
Returns the default hard capactity limit for new buckets.

Returns:
the default hard capactity limit for new buckets

getBucketSoftCapacity

public long getBucketSoftCapacity()
Returns the default soft capactity limit for new buckets.

Returns:
the default soft capactity limit for new buckets

getBucketLowOccupation

public long getBucketLowOccupation()
Returns the default hard low-occupation capactity limit for new buckets.

Returns:
the default hard low-occupation capactity limit for new buckets

getBucketOccupationAsBytes

public boolean getBucketOccupationAsBytes()
Returns the default flag whether to compute occupation & capacity in bytes (true) or number of objects (false) for new buckets.

Returns:
true if the default is to compute occupation & capacity in bytes or false if it is computed in number of objects

getDefaultBucketClass

public java.lang.Class<? extends LocalBucket> getDefaultBucketClass()
Returns the default class for newly created buckets.

Returns:
the default class for newly created buckets

getDefaultBucketClassParams

public java.util.Map<java.lang.String,java.lang.Object> getDefaultBucketClassParams()
Returns the default parameters for newly created buckets with default bucket class.

Returns:
the default parameters for newly created buckets with default bucket class

getBucketCount

public int getBucketCount()
Returns the actual number of buckets maintained by this dispatcher.

Returns:
the dispatcher's bucket count

getOverloadedBucketCount

public int getOverloadedBucketCount()
Returns number of buckets that exceed their soft-capacities.

Returns:
number of buckets that exceed their soft-capacities

getOccupation

public long getOccupation()
Returns the sum of occupations of all buckets maintained by this dispatcher.

Returns:
the sum of occupations of all buckets

getObjectCount

public int getObjectCount()
Returns the sum of object counts stored in all buckets maintained by this dispatcher.

Returns:
the sum of object counts stored in all buckets

getAllBucketIDs

public java.util.Set<java.lang.Integer> getAllBucketIDs()
Returns the set of bucket IDs maintaned by this dispatcher.

Returns:
the set of bucket IDs maintaned by this dispatcher

getAllBuckets

public java.util.Collection<LocalBucket> getAllBuckets()
Returns the collection of all buckets maintained by this dispatcher.

Returns:
the collection of all buckets maintained by this dispatcher

getBucket

public LocalBucket getBucket(int bucketID)
                      throws java.util.NoSuchElementException
Returns the bucket with the specified ID.

Parameters:
bucketID - the ID of the bucket to return
Returns:
the bucket with the specified ID
Throws:
java.util.NoSuchElementException - if there is no bucket associated with the specified ID in this dispatcher

createBucket

public static LocalBucket createBucket(java.lang.Class<? extends LocalBucket> storageClass,
                                       long capacity,
                                       long softCapacity,
                                       long lowOccupation,
                                       boolean occupationAsBytes,
                                       java.util.Map<java.lang.String,java.lang.Object> storageClassParams)
                                throws java.lang.IllegalArgumentException
Create new local bucket with specified storage class and storage capacity (different from default values).

Parameters:
storageClass - the class that represents the bucket implementation to use
capacity - the hard capacity of the new bucket
softCapacity - the soft capacity of the new bucket (soft <= hard must hold otherwise hard is set to soft)
lowOccupation - the low-occupation limit for the new bucket
occupationAsBytes - flag whether the occupation (and thus all the limits) are in bytes or number of objects
storageClassParams - additional parameters for creating a new instance of the storageClass
Returns:
a new instance of the specified bucket class
Throws:
java.lang.IllegalArgumentException - if
  • the provided storageClass is not a part of LocalBucket hierarchy
  • the storageClass does not have a proper constructor (String,long,long)
  • the correct constructor of storageClass is not accesible
  • the constuctor of storageClass has failed

createBucket

public LocalBucket createBucket(java.lang.Class<? extends LocalBucket> storageClass,
                                java.util.Map<java.lang.String,java.lang.Object> storageClassParams,
                                long capacity,
                                long softCapacity,
                                long lowOccupation)
                         throws BucketStorageException,
                                java.lang.IllegalArgumentException
Create new local bucket with specified storage class and storage capacity (different from default values).

Parameters:
storageClass - the class that represents the bucket implementation to use
storageClassParams - additional parameters for creating a new instance of the storageClass
capacity - the hard capacity of the new bucket
softCapacity - the soft capacity of the new bucket (soft <= hard must hold otherwise hard is set to soft)
lowOccupation - the low-occupation limit for the new bucket
Returns:
a new instance of the specified bucket class
Throws:
BucketStorageException - if the maximal number of buckets is already allocated
java.lang.IllegalArgumentException - if
  • the provided storageClass is not a part of LocalBucket hierarchy
  • the storageClass does not have a proper constructor (String,long,long)
  • the correct constructor of storageClass is not accesible
  • the constuctor of storageClass has failed

createBucket

public LocalBucket createBucket()
                         throws BucketStorageException,
                                java.lang.IllegalArgumentException
Create new local bucket with the default storage class and default storage capacity.

Returns:
a new instance of the default bucket class
Throws:
BucketStorageException - if the maximal number of buckets is already allocated
java.lang.IllegalArgumentException - if
  • the provided storageClass is not a part of LocalBucket hierarchy
  • the storageClass does not have a proper constructor (String,long,long)
  • the correct constructor of storageClass is not accesible
  • the constuctor of storageClass has failed

createBucket

public LocalBucket createBucket(java.lang.Class<? extends LocalBucket> storageClass)
                         throws BucketStorageException,
                                java.lang.IllegalArgumentException
Create new local bucket with specified storage class and default storage capacity. No additional parameters are passed to the constructor of the storageClass.

Parameters:
storageClass - the class that represents the bucket implementation to use
Returns:
a new instance of the specified bucket class
Throws:
BucketStorageException - if the maximal number of buckets is already allocated
java.lang.IllegalArgumentException - if
  • the provided storageClass is not a part of LocalBucket hierarchy
  • the storageClass does not have a proper constructor (String,long,long)
  • the correct constructor of storageClass is not accesible
  • the constuctor of storageClass has failed

createBucket

public LocalBucket createBucket(java.lang.Class<? extends LocalBucket> storageClass,
                                java.util.Map<java.lang.String,java.lang.Object> storageClassParams)
                         throws BucketStorageException,
                                java.lang.IllegalArgumentException
Create new local bucket with specified storage class and default storage capacity. Additional parameters cat be specified for the constructor of the storageClass.

Parameters:
storageClass - the class that represents the bucket implementation to use
storageClassParams - additional parameters for creating a new instance of the storageClass
Returns:
a new instance of the specified bucket class
Throws:
BucketStorageException - if the maximal number of buckets is already allocated
java.lang.IllegalArgumentException - if
  • the provided storageClass is not a part of LocalBucket hierarchy
  • the storageClass does not have a proper constructor (String,long,long)
  • the correct constructor of storageClass is not accesible
  • the constuctor of storageClass has failed

createBucket

public LocalBucket createBucket(long capacity,
                                long softCapacity,
                                long lowOccupation)
                         throws BucketStorageException,
                                java.lang.IllegalArgumentException
Create new local bucket with default storage class and specified storage capacity.

Parameters:
capacity - the hard capacity of the new bucket
softCapacity - the soft capacity of the new bucket (soft <= hard must hold otherwise hard is set to soft)
lowOccupation - the low-occupation limit for the new bucket
Returns:
a new instance of the specified bucket class
Throws:
BucketStorageException - if the maximal number of buckets is already allocated
java.lang.IllegalArgumentException - if
  • the provided storageClass is not a part of LocalBucket hierarchy
  • the storageClass does not have a proper constructor (String,long,long)
  • the correct constructor of storageClass is not accesible
  • the constuctor of storageClass has failed

addBucket

public LocalBucket addBucket(LocalBucket bucket)
                      throws java.lang.IllegalStateException,
                             BucketStorageException
Add an existing bucket to this dispatcher. A new unique ID is assigned to the bucket.

Parameters:
bucket - the bucket to add to this dispatcher
Returns:
the added bucket
Throws:
java.lang.IllegalStateException - if the bucket is already maintained by another one
BucketStorageException - if the maximal number of buckets is already allocated

removeBucket

public LocalBucket removeBucket(int bucketID,
                                boolean destroyBucket)
                         throws java.util.NoSuchElementException
Delete the bucket with specified ID from this dispatcher. If destroying the bucket is not requested (i.e. destroyBucket == false), the bucket will be no longer maintained by this dispatcher, but no objects are deleted from the bucket.

Parameters:
bucketID - the ID of the bucket to delete
destroyBucket - if true, all the objects in the bucket are destroyed.
Returns:
the bucket deleted
Throws:
java.util.NoSuchElementException - if there is no bucket with the specified ID

removeBucket

public void removeBucket(int bucketID)
                  throws java.util.NoSuchElementException
Delete the bucket with specified ID from this dispatcher. Note that the bucket is destroyed, i.e. all objects are deleted and However, statistics for the bucket are destroyed.

Parameters:
bucketID - the ID of the bucket to delete
Throws:
java.util.NoSuchElementException - if there is no bucket with the specified ID

moveBucket

public LocalBucket moveBucket(int bucketID,
                              BucketDispatcher targetDispatcher)
                       throws java.util.NoSuchElementException,
                              BucketStorageException
Move the bucket with the specified ID to another dispatcher.

Parameters:
bucketID - the ID of the bucket to move
targetDispatcher - the target dispatcher to move the bucket to
Returns:
the bucket moved
Throws:
java.util.NoSuchElementException - if there is no bucket with the specified ID
BucketStorageException - if the maximal number of buckets is already allocated

toString

public java.lang.String toString()
Returns information about storage maintained by this dispatcher.

Overrides:
toString in class java.lang.Object
Returns:
information about storage maintained by this dispatcher