@InterfaceAudience.Private public class Call extends Object
Modifier and Type | Field and Description |
---|---|
(package private) MetricsConnection.CallStats |
callStats |
(package private) CellScanner |
cells
Optionally has cells when making call.
|
(package private) boolean |
done |
(package private) IOException |
error |
(package private) int |
id |
(package private) com.google.protobuf.Descriptors.MethodDescriptor |
md |
(package private) com.google.protobuf.Message |
param |
(package private) com.google.protobuf.Message |
response |
(package private) com.google.protobuf.Message |
responseDefaultType |
(package private) int |
timeout |
Modifier | Constructor and Description |
---|---|
protected |
Call(int id,
com.google.protobuf.Descriptors.MethodDescriptor md,
com.google.protobuf.Message param,
CellScanner cells,
com.google.protobuf.Message responseDefaultType,
int timeout,
MetricsConnection.CallStats callStats) |
Modifier and Type | Method and Description |
---|---|
protected void |
callComplete()
Indicate when the call is complete and the
value or error are available.
|
boolean |
checkAndSetTimeout()
Check if the call did timeout.
|
long |
getStartTime() |
int |
remainingTime() |
void |
setException(IOException error)
Set the exception when there is an error.
|
void |
setResponse(com.google.protobuf.Message response,
CellScanner cells)
Set the return value when there is no error.
|
String |
toString() |
final int id
final com.google.protobuf.Message param
CellScanner cells
com.google.protobuf.Message response
com.google.protobuf.Message responseDefaultType
IOException error
volatile boolean done
final com.google.protobuf.Descriptors.MethodDescriptor md
final int timeout
final MetricsConnection.CallStats callStats
protected Call(int id, com.google.protobuf.Descriptors.MethodDescriptor md, com.google.protobuf.Message param, CellScanner cells, com.google.protobuf.Message responseDefaultType, int timeout, MetricsConnection.CallStats callStats)
public boolean checkAndSetTimeout()
public int remainingTime()
protected void callComplete()
public void setException(IOException error)
error
- exception thrown by the call; either local or remotepublic void setResponse(com.google.protobuf.Message response, CellScanner cells)
response
- return value of the call.cells
- Can be nullpublic long getStartTime()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.