Interface Sequencer

All Known Implementing Classes:
VolatileSequencer

public interface Sequencer
Multipurpose sequencer.
CardAgents requires persistent sequence number
Sequencer interface isolate from particular DB implementations
Since:
jPOS 1.1
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    get(String counterName)
    Increments counterName by 1 and returns its new value.
    int
    get(String counterName, int add)
    Increments counterName by add and returns its new value.
    int
    set(String counterName, int value)
    Replaces the value of counterName.
  • Method Details

    • get

      int get(String counterName)
      Increments counterName by 1 and returns its new value.
      Parameters:
      counterName - name of the counter
      Returns:
      the counter's new value
    • get

      int get(String counterName, int add)
      Increments counterName by add and returns its new value.
      Parameters:
      counterName - name of the counter
      add - increment to apply
      Returns:
      the counter's new value
    • set

      int set(String counterName, int value)
      Replaces the value of counterName.
      Parameters:
      counterName - name of the counter
      value - new value
      Returns:
      the previous value