Package io.grpc.internal
Class ExponentialBackoffPolicy
java.lang.Object
io.grpc.internal.ExponentialBackoffPolicy
- All Implemented Interfaces:
BackoffPolicy
Retry Policy for Transport reconnection. Initial parameters from
https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md
TODO(carl-mastrangelo): add unit tests for this class
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the number of nanoseconds to wait.
-
Constructor Details
-
ExponentialBackoffPolicy
public ExponentialBackoffPolicy()
-
-
Method Details
-
nextBackoffNanos
public long nextBackoffNanos()Description copied from interface:BackoffPolicy
Returns the number of nanoseconds to wait.- Specified by:
nextBackoffNanos
in interfaceBackoffPolicy
-