@ThreadSafe public final class BlockMasterClientPool extends ResourcePool<BlockMasterClient>
ResourcePool.acquire()
, ResourcePool.release(Object)
must be called when the
thread is done using the client.mCurrentCapacity, mMaxCapacity, mResources
Constructor and Description |
---|
BlockMasterClientPool()
Creates a new block master client pool.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the resource pool.
|
protected BlockMasterClient |
createNewResource()
Creates a new resource which will be added to the resource pool after the user is done using
it.
|
acquire, acquire, release, size
public BlockMasterClientPool()
public void close() throws IOException
ResourcePool
close
in interface Closeable
close
in interface AutoCloseable
close
in class ResourcePool<BlockMasterClient>
IOException
protected BlockMasterClient createNewResource()
ResourcePool
createNewResource
in class ResourcePool<BlockMasterClient>
Copyright © 2023. All Rights Reserved.