Class Pong


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

      Constructors 
      Constructor Description
      Pong()  
      Pong​(long activeDocuments)  
      Pong​(ErrorMessage error)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<java.lang.Long> activeDocuments()
      Returns the number of active documents in the backend responding in this Pong, if available
      java.util.Optional<java.lang.Integer> activeNodes()
      Returns the number of nodes which responded to this Pong, if available
      void addError​(ErrorMessage error)  
      boolean badResponse()
      Returns whether there is an error or not
      ElapsedTime getElapsedTime()  
      ErrorMessage getError​(int i)  
      java.util.List<ErrorMessage> getErrors()  
      java.lang.String toString()
      Returns a string which included the ping info (if any) and any errors added to this
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Pong

        public Pong()
      • Pong

        public Pong​(long activeDocuments)
    • Method Detail

      • activeDocuments

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

        public java.util.Optional<java.lang.Integer> activeNodes()
        Returns the number of nodes which responded to this Pong, if available
      • getErrors

        public java.util.List<ErrorMessage> getErrors()
      • 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