Package com.yahoo.prelude
Class Pong
- java.lang.Object
-
- com.yahoo.prelude.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 availablejava.util.Optional<java.lang.Integer>
activeNodes()
Returns the number of nodes which responded to this Pong, if availablevoid
addError(ErrorMessage error)
boolean
badResponse()
Returns whether there is an error or notElapsedTime
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
-
-
-
Constructor Detail
-
Pong
public Pong()
-
Pong
public Pong(ErrorMessage error)
-
Pong
public Pong(long activeDocuments)
-
-
Method Detail
-
addError
public void addError(ErrorMessage error)
-
getError
public ErrorMessage getError(int i)
-
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
-
getElapsedTime
public ElapsedTime getElapsedTime()
-
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 classjava.lang.Object
-
-