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 Exception
InterruptedException
public void execute(ClientPool.ExecuteAction<C,E> action) throws E extends Exception, InterruptedException
execute
in interface ClientPool<C,E extends Exception>
E extends Exception
InterruptedException
protected abstract void close(C client)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.