Package io.grpc.alts.internal
Class RpcProtocolVersionsUtil
- java.lang.Object
-
- io.grpc.alts.internal.RpcProtocolVersionsUtil
-
public final class RpcProtocolVersionsUtil extends java.lang.ObjectUtility class for Rpc Protocol Versions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classRpcProtocolVersionsUtil.RpcVersionsCheckResultWrapper class that stores results of Rpc Protocol Versions check.
-
Field Summary
Fields Modifier and Type Field Description private static intMAX_RPC_VERSION_MAJORprivate static intMAX_RPC_VERSION_MINORprivate static intMIN_RPC_VERSION_MAJORprivate static intMIN_RPC_VERSION_MINORprivate static RpcProtocolVersionsRPC_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.RpcVersionsCheckResultcheckRpcProtocolVersions(RpcProtocolVersions localVersions, RpcProtocolVersions peerVersions)Performs check between local and peer Rpc Protocol Versions.static RpcProtocolVersionsgetRpcProtocolVersions()Returns default Rpc Protocol Versions.(package private) static booleanisGreaterThanOrEqualTo(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.
-
-