Class ReSttc

  • All Implemented Interfaces:
    Sttc

    @Immutable
    @Loggable(1)
    public final class ReSttc
    extends Object
    implements Sttc
    Retriable Sttc.

    Just wrap your original Sttc object with this decorator and all requests to stateful.co server will be retried a few times before giving up and throwing a runtime exception. It is highly recommended to use this decorator in production environment. The Internet is not a stable environment, and connection failures is a regular event.

    Since:
    0.5
    • Constructor Detail

      • ReSttc

        public ReSttc​(Sttc orgn)
        Ctor.
        Parameters:
        orgn - Original object
    • Method Detail

      • counters

        @RetryOnFailure(verbose=false,
                        attempts=20,
                        delay=20L,
                        unit=SECONDS)
        public Counters counters()
                          throws IOException
        Description copied from interface: Sttc
        Counters.
        Specified by:
        counters in interface Sttc
        Returns:
        Counters
        Throws:
        IOException - If some I/O problem
      • locks

        @RetryOnFailure(verbose=false,
                        attempts=20,
                        delay=20L,
                        unit=SECONDS)
        public Locks locks()
                    throws IOException
        Description copied from interface: Sttc
        Locks.
        Specified by:
        locks in interface Sttc
        Returns:
        Locks
        Throws:
        IOException - If some I/O problem