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:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description Pong()
Pong(long activeDocuments)
Pong(long activeDocuments, boolean isBlockingWrites)
Pong(ErrorMessage error)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated 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()
Deprecated.do not use.void
addError(ErrorMessage error)
Deprecated.do not use.boolean
badResponse()
Returns whether there is an error or notjava.util.Optional<ErrorMessage>
error()
ElapsedTime
getElapsedTime()
ErrorMessage
getError(int i)
Deprecated.use error() insteadjava.util.List<ErrorMessage>
getErrors()
Deprecated.use error() insteadboolean
isBlockingWrites()
Returns true if the pinged node is currently blocking write operations due to being fulljava.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)
-
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
-
error
public java.util.Optional<ErrorMessage> error()
-
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() insteadReturns 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 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
-
-