RPCResultBase¶
-
template<class
_T
>
classkanzi::connect
::
RPCResultBase
¶ Subclassed by RPCResultImpl< _T >
Public Functions
-
inline
RPCResultBase
()¶ C++ constructor - initialize the object.
-
inline RPCTypes::CommHandle
getHandle
() const¶ Retrieve the communication handle.
- Returns
handle.
-
inline int32_t
getRPCCallResult
() const¶ Returns the low level RPC result.
- Returns
result, oneof RPCResultValue::RESULT_ enumerations. If value differs from RPCResultValue::RESULT_OK then the destination service has not been contacted (at least not just yet if RESULT_INPROGRESS).
-
inline void
invalidate
()¶ Invalidates the object.
After this, valid() will return false and quering the value will throw an exception.
-
inline bool
isComplete
() const¶ Checks whether RPC call is complete.
- Returns
true if call is complete and getValue can be safely called.
-
inline bool
testIsTimedOut
(const chrono::steady_clock::time_point &now) const¶ Tests whether operation has timed out.
- Returns
true if operation has timed out.
-
inline bool
valid
() const¶ Determines whether the RPC Result is still valid.
- Returns
true if still valid.
-
inline bool
waitComplete
(int msToWait) const¶ Checks whether RPC call is complete.
Optionally waits for specific amount of time
- Parameters
msToWait – how long to wait for RPC to become complete
- Returns
true if call is complete and getValue can be safely called.
-
inline