Class MergeCounter

java.lang.Object
i5.las2peer.persistency.helper.MergeCounter

public class MergeCounter extends Object
This class is used in the collision handling process. It counts the number of collisions (merging attempts) and helps finding a reasonable limit to terminate the merging process. To terminate the merging process a StorageCollisionHandler should throw an StopMergingException.
  • Constructor Details

    • MergeCounter

      public MergeCounter()
      default constructor
  • Method Details

    • increase

      public void increase() throws StopMergingException
      This method is called on each merging attempt and increases the counter.
      Throws:
      StopMergingException - If the counter is greater than the 1000000000L to prevent some infinite lookps.
    • value

      public long value()
      Gets the current value of this counter.
      Returns:
      Returns the value.