public abstract static class ClientPool.ClientPoolImpl<C,E extends Exception> extends Object implements Closeable, ClientPool<C,E>
ClientPool.ClientPool.Action<R,C,E extends Exception>, ClientPool.ClientPoolImpl<C,E extends Exception>, ClientPool.ExecuteAction<C,E extends Exception>| Modifier | Constructor and Description |
|---|---|
protected |
ClientPoolImpl(int poolSize,
java.util.function.Supplier<C> supplier) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected abstract void |
close(C client) |
void |
execute(ClientPool.ExecuteAction<C,E> action) |
<R> R |
run(ClientPool.Action<R,C,E> action) |
protected ClientPoolImpl(int poolSize,
java.util.function.Supplier<C> supplier)
public <R> R run(ClientPool.Action<R,C,E> action) throws E extends Exception, InterruptedException
run in interface ClientPool<C,E extends Exception>E extends ExceptionInterruptedExceptionpublic void execute(ClientPool.ExecuteAction<C,E> action) throws E extends Exception, InterruptedException
execute in interface ClientPool<C,E extends Exception>E extends ExceptionInterruptedExceptionprotected abstract void close(C client)
public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2023–2025 The Apache Software Foundation. All rights reserved.