Class RelationalServer

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    @API(EXPERIMENTAL)
    public class RelationalServer
    extends java.lang.Object
    implements java.io.Closeable
    Relational Server. Hosts the JDBC GRPC Service and an HTTP server to export metrics on. (On why two ports in one server, see prometheus issue for discussion https://github.com/prometheus/prometheus/issues/8414)
    See Also:
    InProcessRelationalServer
    • Constructor Detail

      • RelationalServer

        public RelationalServer​(int grpcPort,
                                int httpPort)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getGrpcPort

        public int getGrpcPort()
        GRPC port. Error if you call this method before start() completes.
        Returns:
        The port GRPC is listening on
      • getHttpPort

        public int getHttpPort()
        HTTP port. Error if you call this method before start() completes.
        Returns:
        The port HTTP is listening on
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException,
                                java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.InterruptedException