Package io.milvus.param
Class R<T>
java.lang.Object
io.milvus.param.R<T>
Utility class to wrap gpc response and exceptions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents server and client side status code -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> R<T> Wraps an error code and error message for failure.static <T> R<T> Wraps a status code and error message for failure.static <T> R<T> Wraps an exception for failure.getData()voidvoidsetException(Exception exception) voidstatic <T> R<T> success()Returns a succeed status.static <T> R<T> success(T data) Wraps a succeed rpc response object.toString()Constructs aStringbyRinstance.
-
Constructor Details
-
R
public R()
-
-
Method Details
-
getException
-
setException
-
getMessage
-
getStatus
-
setStatus
-
getData
-
setData
-
failed
Wraps an exception for failure.- Parameters:
exception- exception object- Returns:
R
-
failed
Wraps an error code and error message for failure.- Parameters:
errorCode- rpc error codemsg- error message- Returns:
R
-
failed
Wraps a status code and error message for failure.- Parameters:
statusCode- status codemsg- error message- Returns:
R
-
success
Returns a succeed status.- Returns:
R
-
success
Wraps a succeed rpc response object.- Parameters:
data- rpc response object- Returns:
R
-
toString
Constructs aStringbyRinstance.
-