Class Pong


  • public class Pong
    extends java.lang.Object
    An answer from Ping.
    Author:
    bratseth
    • Constructor Summary

      Constructors 
      Constructor Description
      Pong()  
      Pong​(long activeDocuments)  
      Pong​(long activeDocuments, boolean isBlockingWrites)  
      Pong​(ErrorMessage error)  
    • Constructor Detail

      • Pong

        public Pong()
      • Pong

        public Pong​(long activeDocuments)
      • Pong

        public Pong​(long activeDocuments,
                    boolean isBlockingWrites)
    • Method Detail

      • addError

        @Deprecated
        public void addError​(ErrorMessage error)
        Deprecated.
        do not use. Additional errors are ignored.
      • getError

        @Deprecated
        public ErrorMessage getError​(int i)
        Deprecated.
        use error() instead
      • activeDocuments

        public java.util.Optional<java.lang.Long> activeDocuments()
        Returns the number of active documents in the backend responding in this Pong, if available
      • isBlockingWrites

        public boolean isBlockingWrites()
        Returns true if the pinged node is currently blocking write operations due to being full
      • activeNodes

        @Deprecated
        public java.util.Optional<java.lang.Integer> activeNodes()
        Deprecated.
        do not use. There is always one pong per node.
        Returns Optional.empty()
        Returns:
        empty
      • getErrors

        @Deprecated
        public java.util.List<ErrorMessage> getErrors()
        Deprecated.
        use error() instead
        Returns a list containing 0 or 1 errors
      • badResponse

        public boolean badResponse()
        Returns whether there is an error or not
      • toString

        public java.lang.String toString()
        Returns a string which included the ping info (if any) and any errors added to this
        Overrides:
        toString in class java.lang.Object