Class OrderInterceptor.Counter

java.lang.Object
org.apache.catalina.tribes.group.interceptors.OrderInterceptor.Counter
Enclosing class:
OrderInterceptor

protected static class OrderInterceptor.Counter extends Object
Counter for tracking message sequence numbers.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a Counter with initial value 0.
    Counter(int startValue)
    Constructs a Counter with the given initial value.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the current counter value.
    int
    inc()
    Increments the counter and returns the new value.
    void
    setCounter(int counter)
    Sets the counter value.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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