Class Pong

java.lang.Object
com.yahoo.prelude.Pong

public class Pong extends Object
An answer from Ping.
Author:
bratseth
  • Constructor Details

    • Pong

      public Pong()
    • Pong

      public Pong(ErrorMessage error)
    • Pong

      public Pong(long activeDocuments)
    • Pong

      public Pong(long activeDocuments, boolean isBlockingWrites)
  • Method Details

    • 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
    • error

      public Optional<ErrorMessage> error()
    • activeDocuments

      public Optional<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 Optional<Integer> activeNodes()
      Deprecated.
      do not use. There is always one pong per node.
      Returns Optional.empty()
      Returns:
      empty
    • getErrors

      @Deprecated public 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
    • getElapsedTime

      public ElapsedTime getElapsedTime()
    • toString

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