Class ClientPool<C,​E extends java.lang.Exception>

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    HiveClientPool

    public abstract class ClientPool<C,​E extends java.lang.Exception>
    extends java.lang.Object
    implements java.io.Closeable
    • Method Detail

      • run

        public <R> R run​(ClientPool.Action<R,​C,​E> action)
                  throws E extends java.lang.Exception,
                         java.lang.InterruptedException
        Throws:
        E extends java.lang.Exception
        java.lang.InterruptedException
      • newClient

        protected abstract C newClient()
      • reconnect

        protected abstract C reconnect​(C client)
      • close

        protected abstract void close​(C client)
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable