Class VolatileSequencer

java.lang.Object
org.jpos.core.VolatileSequencer
All Implemented Interfaces:
Sequencer, VolatileSequencerMBean

public class VolatileSequencer extends Object implements Sequencer, VolatileSequencerMBean
A simple sequencer intended for Debugging applications.
Production grade Sequencers are required to be persistent capables
Since:
jPOS 1.1
  • Constructor Details

  • Method Details

    • get

      public int get(String counterName, int add)
      Description copied from interface: Sequencer
      Increments counterName by add and returns its new value.
      Specified by:
      get in interface Sequencer
      Specified by:
      get in interface VolatileSequencerMBean
      Parameters:
      counterName - name of the counter
      add - increment
      Returns:
      counterName's value + add
    • get

      public int get(String counterName)
      Description copied from interface: Sequencer
      Increments counterName by 1 and returns its new value.
      Specified by:
      get in interface Sequencer
      Parameters:
      counterName - name of the counter
      Returns:
      counterName's value + 1
    • set

      public int set(String counterName, int newValue)
      Description copied from interface: Sequencer
      Replaces the value of counterName.
      Specified by:
      set in interface Sequencer
      Specified by:
      set in interface VolatileSequencerMBean
      Parameters:
      counterName - name of the counter
      newValue - value to assign to the counter
      Returns:
      oldValue
    • getCounterNames

      public String[] getCounterNames()
      Description copied from interface: VolatileSequencerMBean
      Returns the names of every registered counter.
      Specified by:
      getCounterNames in interface VolatileSequencerMBean
      Returns:
      array of counter names