@ThreadSafe public final class BlockWorkerClientPool extends alluxio.resource.DynamicResourcePool<BlockWorkerClient>
DynamicResourcePool.acquire(), DynamicResourcePool.release(Object) must be called
when the thread is done using the client.| Constructor and Description |
|---|
BlockWorkerClientPool(Subject subject,
alluxio.grpc.GrpcServerAddress address,
int maxCapacity,
alluxio.conf.AlluxioConfiguration alluxioConf,
io.netty.channel.EventLoopGroup workerGroup)
Creates a new block master client pool.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeResource(BlockWorkerClient client) |
protected BlockWorkerClient |
createNewResource() |
protected boolean |
isHealthy(BlockWorkerClient client)
Checks whether a client is healthy.
|
protected boolean |
shouldGc(alluxio.resource.DynamicResourcePool.ResourceInternal<BlockWorkerClient> clientResourceInternal) |
public BlockWorkerClientPool(Subject subject, alluxio.grpc.GrpcServerAddress address, int maxCapacity, alluxio.conf.AlluxioConfiguration alluxioConf, io.netty.channel.EventLoopGroup workerGroup)
subject - the parent subjectaddress - address of the workermaxCapacity - the maximum capacity of the poolalluxioConf - Alluxio configurationworkerGroup - netty event loop group to create clients with is above the minimum
capacity(1), it is closed and removed from the pool.protected void closeResource(BlockWorkerClient client) throws IOException
closeResource in class alluxio.resource.DynamicResourcePool<BlockWorkerClient>IOExceptionprotected BlockWorkerClient createNewResource() throws IOException
createNewResource in class alluxio.resource.DynamicResourcePool<BlockWorkerClient>IOExceptionprotected boolean isHealthy(BlockWorkerClient client)
isHealthy in class alluxio.resource.DynamicResourcePool<BlockWorkerClient>client - the client to checkprotected boolean shouldGc(alluxio.resource.DynamicResourcePool.ResourceInternal<BlockWorkerClient> clientResourceInternal)
shouldGc in class alluxio.resource.DynamicResourcePool<BlockWorkerClient>Copyright © 2024. All Rights Reserved.