Class ReaperElementManager
java.lang.Object
com.arjuna.ats.internal.arjuna.coordinator.ReaperElementManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(ReaperElement reaperElement) getFirst()
boolean
isEmpty()
void
remove
(ReaperElement reaperElement) long
reorder
(ReaperElement reaperElement, long delayMillis) void
int
size()
-
Constructor Details
-
ReaperElementManager
public ReaperElementManager()
-
-
Method Details
-
getFirst
- Returns:
- the first (i.e. earliest to time out) element of the colleciton or null if empty
-
add
- Throws:
IllegalStateException
-
reorder
- 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
-