Package io.grpc.alts.internal
Class RpcProtocolVersionsUtil
- java.lang.Object
-
- io.grpc.alts.internal.RpcProtocolVersionsUtil
-
public final class RpcProtocolVersionsUtil extends java.lang.Object
Utility class for Rpc Protocol Versions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
RpcProtocolVersionsUtil.RpcVersionsCheckResult
Wrapper class that stores results of Rpc Protocol Versions check.
-
Field Summary
Fields Modifier and Type Field Description private static int
MAX_RPC_VERSION_MAJOR
private static int
MAX_RPC_VERSION_MINOR
private static int
MIN_RPC_VERSION_MAJOR
private static int
MIN_RPC_VERSION_MINOR
private static RpcProtocolVersions
RPC_PROTOCOL_VERSIONS
-
Constructor Summary
Constructors Constructor Description RpcProtocolVersionsUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static RpcProtocolVersionsUtil.RpcVersionsCheckResult
checkRpcProtocolVersions(RpcProtocolVersions localVersions, RpcProtocolVersions peerVersions)
Performs check between local and peer Rpc Protocol Versions.static RpcProtocolVersions
getRpcProtocolVersions()
Returns default Rpc Protocol Versions.(package private) 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.
-
-
-
Field Detail
-
MAX_RPC_VERSION_MAJOR
private static final int MAX_RPC_VERSION_MAJOR
- See Also:
- Constant Field Values
-
MAX_RPC_VERSION_MINOR
private static final int MAX_RPC_VERSION_MINOR
- See Also:
- Constant Field Values
-
MIN_RPC_VERSION_MAJOR
private static final int MIN_RPC_VERSION_MAJOR
- See Also:
- Constant Field Values
-
MIN_RPC_VERSION_MINOR
private static final int MIN_RPC_VERSION_MINOR
- See Also:
- Constant Field Values
-
RPC_PROTOCOL_VERSIONS
private static final RpcProtocolVersions RPC_PROTOCOL_VERSIONS
-
-
Method Detail
-
getRpcProtocolVersions
public static RpcProtocolVersions 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.
-
-