Package com.yahoo.prelude
Class Pong
- java.lang.Object
-
- com.yahoo.prelude.Pong
-
public class Pong extends 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 Optional<Long>
activeDocuments()
Returns the number of active documents in the backend responding in this Pong, if availableOptional<Integer>
activeNodes()
Deprecated.do not use.void
addError(ErrorMessage error)
Deprecated.do not use.boolean
badResponse()
Returns whether there is an error or notOptional<ErrorMessage>
error()
ElapsedTime
getElapsedTime()
ErrorMessage
getError(int i)
Deprecated.use error() insteadList<ErrorMessage>
getErrors()
Deprecated.use error() insteadboolean
isBlockingWrites()
Returns true if the pinged node is currently blocking write operations due to being fullString
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 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() insteadReturns a list containing 0 or 1 errors
-
badResponse
public boolean badResponse()
Returns whether there is an error or not
-
getElapsedTime
public ElapsedTime getElapsedTime()
-
-