Public Member Functions | |
def | __init__ (self, exception, traceback) |
def | __iter__ (self) |
def | __next__ (self) |
def | add_callback (self, unused_callback) |
def | add_done_callback (self, fn) |
def | cancel (self) |
def | cancelled (self) |
def | code (self) |
def | details (self) |
def | done (self) |
def | exception (self, ignored_timeout=None) |
def | initial_metadata (self) |
def | is_active (self) |
def | next (self) |
def | result (self, ignored_timeout=None) |
def | running (self) |
def | time_remaining (self) |
def | traceback (self, ignored_timeout=None) |
def | trailing_metadata (self) |
Private Attributes | |
_exception | |
_traceback | |
Definition at line 88 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.__init__ | ( | self, | |
exception, | |||
traceback | |||
) |
Definition at line 90 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.__iter__ | ( | self | ) |
Definition at line 140 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.__next__ | ( | self | ) |
Definition at line 143 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.add_callback | ( | self, | |
callback | |||
) |
Registers a callback to be called on RPC termination. Args: callback: A no-parameter callable to be called on RPC termination. Returns: True if the callback was added and will be called later; False if the callback was not added and will not be called (because the RPC already terminated or some other reason).
Reimplemented from grpc.RpcContext.
Definition at line 134 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.add_done_callback | ( | self, | |
fn | |||
) |
Adds a function to be called at completion of the computation. The callback will be passed this Future object describing the outcome of the computation. Callbacks will be invoked after the future is terminated, whether successfully or not. If the computation has already completed, the callback will be called immediately. Exceptions raised in the callback will be logged at ERROR level, but will not terminate any threads of execution. Args: fn: A callable taking this Future object as its single parameter.
Reimplemented from grpc.Future.
Definition at line 137 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.cancel | ( | self | ) |
Attempts to cancel the computation. This method does not block. Returns: bool: Returns True if the computation was canceled. Returns False under all other circumstances, for example: 1. computation has begun and could not be canceled. 2. computation has finished 3. computation is scheduled for execution and it is impossible to determine its state without blocking.
Reimplemented from grpc.Future.
Definition at line 107 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.cancelled | ( | self | ) |
Describes whether the computation was cancelled. This method does not block. Returns: bool: Returns True if the computation was cancelled before its result became available. Returns False under all other circumstances, for example: 1. computation was not cancelled. 2. computation's result is available.
Reimplemented from grpc.Future.
Definition at line 110 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.code | ( | self | ) |
Accesses the status code sent by the server. This method blocks until the value is available. Returns: The StatusCode value for the RPC.
Reimplemented from grpc.Call.
Definition at line 101 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.details | ( | self | ) |
Accesses the details sent by the server. This method blocks until the value is available. Returns: The details string of the RPC.
Reimplemented from grpc.Call.
Definition at line 104 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.done | ( | self | ) |
Describes whether the computation has taken place. This method does not block. Returns: bool: Returns True if the computation already executed or was cancelled. Returns False if the computation is scheduled for execution or currently executing. This is exactly opposite of the running() method's result.
Reimplemented from grpc.Future.
Definition at line 122 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.exception | ( | self, | |
timeout = None |
|||
) |
Return the exception raised by the computation. This method may return immediately or may block. Args: timeout: The length of time in seconds to wait for the computation to terminate or be cancelled. If None, the call will block until the computations's termination. Returns: The exception raised by the computation, or None if the computation did not raise an exception. Raises: FutureTimeoutError: If a timeout value is passed and the computation does not terminate within the allotted time. FutureCancelledError: If the computation was cancelled.
Reimplemented from grpc.Future.
Definition at line 128 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.initial_metadata | ( | self | ) |
Accesses the initial metadata sent by the server. This method blocks until the value is available. Returns: The initial :term:`metadata`.
Reimplemented from grpc.Call.
Definition at line 95 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.is_active | ( | self | ) |
Describes whether the RPC is active or has terminated. Returns: bool: True if RPC is active, False otherwise.
Reimplemented from grpc.RpcContext.
Definition at line 113 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.next | ( | self | ) |
Definition at line 146 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.result | ( | self, | |
timeout = None |
|||
) |
Returns the result of the computation or raises its exception. This method may return immediately or may block. Args: timeout: The length of time in seconds to wait for the computation to finish or be cancelled. If None, the call will block until the computations's termination. Returns: The return value of the computation. Raises: FutureTimeoutError: If a timeout value is passed and the computation does not terminate within the allotted time. FutureCancelledError: If the computation was cancelled. Exception: If the computation raised an exception, this call will raise the same exception.
Reimplemented from grpc.Future.
Definition at line 125 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.running | ( | self | ) |
Describes whether the computation is taking place. This method does not block. Returns: Returns True if the computation is scheduled for execution or currently executing. Returns False if the computation already executed or was cancelled.
Reimplemented from grpc.Future.
Definition at line 119 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.time_remaining | ( | self | ) |
Describes the length of allowed time remaining for the RPC. Returns: A nonnegative float indicating the length of allowed time in seconds remaining for the RPC to complete before it is considered to have timed out, or None if no deadline was specified for the RPC.
Reimplemented from grpc.RpcContext.
Definition at line 116 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.traceback | ( | self, | |
timeout = None |
|||
) |
Access the traceback of the exception raised by the computation. This method may return immediately or may block. Args: timeout: The length of time in seconds to wait for the computation to terminate or be cancelled. If None, the call will block until the computation's termination. Returns: The traceback of the exception raised by the computation, or None if the computation did not raise an exception. Raises: FutureTimeoutError: If a timeout value is passed and the computation does not terminate within the allotted time. FutureCancelledError: If the computation was cancelled.
Reimplemented from grpc.Future.
Definition at line 131 of file _interceptor.py.
def grpc._interceptor._FailureOutcome.trailing_metadata | ( | self | ) |
Accesses the trailing metadata sent by the server. This method blocks until the value is available. Returns: The trailing :term:`metadata`.
Reimplemented from grpc.Call.
Definition at line 98 of file _interceptor.py.
|
private |
Definition at line 92 of file _interceptor.py.
|
private |
Definition at line 93 of file _interceptor.py.