@ThreadSafe public final class BlockMasterClientPool extends DynamicResourcePool<BlockMasterClient>
ResourcePool.acquire()
, ResourcePool.release(Object)
must be called when the
thread is done using the client.DynamicResourcePool.Options, DynamicResourcePool.ResourceInternal<R>
mClock
Constructor and Description |
---|
BlockMasterClientPool(MasterClientContext ctx)
Creates a new block master client pool.
|
Modifier and Type | Method and Description |
---|---|
protected void |
closeResource(BlockMasterClient client)
Closes the resource.
|
protected BlockMasterClient |
createNewResource()
Creates a new resource.
|
protected boolean |
isHealthy(BlockMasterClient client)
Checks whether a resource is healthy or not.
|
protected boolean |
shouldGc(DynamicResourcePool.ResourceInternal<BlockMasterClient> clientResourceInternal) |
public BlockMasterClientPool(MasterClientContext ctx)
ctx
- the information required for connecting to Alluxioprotected void closeResource(BlockMasterClient client)
DynamicResourcePool
closeResource
in class DynamicResourcePool<BlockMasterClient>
client
- the resource to closeprotected BlockMasterClient createNewResource()
DynamicResourcePool
createNewResource
in class DynamicResourcePool<BlockMasterClient>
protected boolean isHealthy(BlockMasterClient client)
DynamicResourcePool
isHealthy
in class DynamicResourcePool<BlockMasterClient>
client
- the resource to checkprotected boolean shouldGc(DynamicResourcePool.ResourceInternal<BlockMasterClient> clientResourceInternal)
shouldGc
in class DynamicResourcePool<BlockMasterClient>
clientResourceInternal
- the resource to checkCopyright © 2023. All Rights Reserved.