messif.buckets.split
Interface SplittableAlgorithm


public interface SplittableAlgorithm

Implement this interface on an Algorithm if it supports "clever" splitting. If this interface is not implemented for an algorithm, the standard way through get all objects and delete operations will be used in case of splitting.

See Also:
Algorithm, SplitPolicy

Nested Class Summary
static interface SplittableAlgorithm.SplittableAlgorithmResult
          This is helper class that allows the split method to control the creation of algorithms.
 
Method Summary
 void split(SplitPolicy policy, SplittableAlgorithm.SplittableAlgorithmResult result, int whoStays)
          Split this algorithm according to the specified policy.
 

Method Detail

split

void split(SplitPolicy policy,
           SplittableAlgorithm.SplittableAlgorithmResult result,
           int whoStays)
           throws BucketStorageException,
                  java.lang.IllegalArgumentException
Split this algorithm according to the specified policy. The newly created algorithms should be returned by adding them to the splitAlgorithms.

Parameters:
policy - the splitting policy to use
result - object used to return results of the split
whoStays - identification of a partition whose objects stay in this bucket.
Throws:
java.lang.IllegalArgumentException - if there are too few target buckets
BucketStorageException - if there was a storage error during split