Package co.stateful

Interface Counter

  • All Known Implementing Classes:
    ReCounter

    @Immutable
    public interface Counter
    Counter.
    Since:
    0.1
    • Method Detail

      • name

        String name()
        Its name.
        Returns:
        Name of this lock
        Since:
        0.8
      • set

        void set​(long value)
          throws IOException
        Set specific value.
        Parameters:
        value - Value to set
        Throws:
        IOException - If some I/O problem
      • incrementAndGet

        long incrementAndGet​(long delta)
                      throws IOException
        Add value to it.
        Parameters:
        delta - Delta to add (can be zero or negative)
        Returns:
        New value
        Throws:
        IOException - If some I/O problem