Package io.grpc.alts.internal
Class RpcProtocolVersionsUtil
java.lang.Object
io.grpc.alts.internal.RpcProtocolVersionsUtil
Utility class for Rpc Protocol Versions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
Wrapper class that stores results of Rpc Protocol Versions check. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private static final int
private static final int
private static final RpcProtocolVersions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static RpcProtocolVersionsUtil.RpcVersionsCheckResult
checkRpcProtocolVersions
(RpcProtocolVersions localVersions, RpcProtocolVersions peerVersions) Performs check between local and peer Rpc Protocol Versions.static RpcProtocolVersions
Returns default Rpc Protocol Versions.(package private) static boolean
Returns true if first Rpc Protocol Version is greater than or equal to the second one.
-
Field Details
-
MAX_RPC_VERSION_MAJOR
private static final int MAX_RPC_VERSION_MAJOR- See Also:
-
MAX_RPC_VERSION_MINOR
private static final int MAX_RPC_VERSION_MINOR- See Also:
-
MIN_RPC_VERSION_MAJOR
private static final int MIN_RPC_VERSION_MAJOR- See Also:
-
MIN_RPC_VERSION_MINOR
private static final int MIN_RPC_VERSION_MINOR- See Also:
-
RPC_PROTOCOL_VERSIONS
-
-
Constructor Details
-
RpcProtocolVersionsUtil
public RpcProtocolVersionsUtil()
-
-
Method Details
-
getRpcProtocolVersions
Returns default Rpc Protocol Versions. -
isGreaterThanOrEqualTo
static boolean isGreaterThanOrEqualTo(RpcProtocolVersions.Version first, RpcProtocolVersions.Version second) Returns true if first Rpc Protocol Version is greater than or equal to the second one. Returns false otherwise. -
checkRpcProtocolVersions
static RpcProtocolVersionsUtil.RpcVersionsCheckResult checkRpcProtocolVersions(RpcProtocolVersions localVersions, RpcProtocolVersions peerVersions) Performs check between local and peer Rpc Protocol Versions. This function returns true and the highest common version if there exists a common Rpc Protocol Version to use, and returns false and null otherwise.
-