Class GrpcUtils

java.lang.Object
org.rasdaman.rasnet.util.GrpcUtils

public class GrpcUtils extends Object
  • Constructor Details

    • GrpcUtils

      public GrpcUtils()
  • Method Details

    • convertStatusToRuntimeException

      public static 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.