public abstract class ClientPool<C,E extends java.lang.Exception>
extends java.lang.Object
implements java.io.Closeable
Modifier and Type | Class and Description |
---|---|
static interface |
ClientPool.Action<R,C,E extends java.lang.Exception> |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected abstract void |
close(C client) |
protected boolean |
isConnectionException(java.lang.Exception exc) |
protected abstract C |
newClient() |
protected abstract C |
reconnect(C client) |
<R> R |
run(ClientPool.Action<R,C,E> action) |
public <R> R run(ClientPool.Action<R,C,E> action) throws E extends java.lang.Exception, java.lang.InterruptedException
E extends java.lang.Exception
java.lang.InterruptedException
protected abstract C newClient()
protected boolean isConnectionException(java.lang.Exception exc)
protected abstract void close(C client)
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable