Class OrderInterceptor.Counter
java.lang.Object
org.apache.catalina.tribes.group.interceptors.OrderInterceptor.Counter
- Enclosing class:
OrderInterceptor
Counter for tracking message sequence numbers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the current counter value.intinc()Increments the counter and returns the new value.voidsetCounter(int counter) Sets the counter value.
-
Constructor Details
-
Counter
public Counter()Constructs a Counter with initial value 0. -
Counter
public Counter(int startValue) Constructs a Counter with the given initial value.- Parameters:
startValue- The initial value
-
-
Method Details
-
getCounter
public int getCounter()Returns the current counter value.- Returns:
- The counter value
-
setCounter
public void setCounter(int counter) Sets the counter value.- Parameters:
counter- The new counter value
-
inc
public int inc()Increments the counter and returns the new value.- Returns:
- The new counter value
-