Class ReaperElementManager

java.lang.Object
com.arjuna.ats.internal.arjuna.coordinator.ReaperElementManager

public class ReaperElementManager extends Object
  • Constructor Details

    • ReaperElementManager

      public ReaperElementManager()
  • Method Details

    • getFirst

      public ReaperElement getFirst()
      Returns:
      the first (i.e. earliest to time out) element of the colleciton or null if empty
    • add

      public void add(ReaperElement reaperElement) throws IllegalStateException
      Throws:
      IllegalStateException
    • reorder

      public long reorder(ReaperElement reaperElement, long delayMillis)
      Parameters:
      reaperElement - the reaper element to reorder in the sorted set.
      delayMillis - the amount of time to increment the element's timeout by.
      Returns:
      the new soonest timeout in the set (not necessarily that of the reordered element)
    • size

      public int size()
    • isEmpty

      public boolean isEmpty()
    • setAllTimeoutsToZero

      public void setAllTimeoutsToZero()
    • remove

      public void remove(ReaperElement reaperElement)