Class GrpcUtils


  • public class GrpcUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      GrpcUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.RuntimeException convertStatusToRuntimeException​(io.grpc.Status status)  
      static boolean isServerAlive​(org.rasdaman.rasnet.service.HealthServiceGrpc.HealthServiceBlockingStub healthService, int timeoutMilliseconds)
      Utility function used to check if the server is alive.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GrpcUtils

        public GrpcUtils()
    • Method Detail

      • convertStatusToRuntimeException

        public static java.lang.RuntimeException convertStatusToRuntimeException​(io.grpc.Status status)
      • isServerAlive

        public static boolean isServerAlive​(org.rasdaman.rasnet.service.HealthServiceGrpc.HealthServiceBlockingStub healthService,
                                            int timeoutMilliseconds)
        Utility function used to check if the server is alive.
        Parameters:
        healthService - Initialized HealthServiceGrpc.HealthServiceBlockingStub connected to the server.
        timeoutMilliseconds - The number of milliseconds for which the client will wait for a reply from the server before declaring it unresponsive and returning false.
        Returns:
        TRUE if the server responds with a valid message within the given timeout, FALSE otherwise.