public final class BlockWorkerClientPool extends ResourcePool<WorkerClient>
ResourcePool.acquire()
, ResourcePool.release(T)
must be called when the thread is done
using the client.mCapacityLock, mCurrentCapacity, mMaxCapacity, mResources
Constructor and Description |
---|
BlockWorkerClientPool(NetAddress workerAddress)
Creates a new block worker client pool.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected WorkerClient |
createNewResource() |
void |
release(WorkerClient workerClient) |
acquire
public BlockWorkerClientPool(NetAddress workerAddress)
workerAddress
- the worker addresspublic void close()
close
in class ResourcePool<WorkerClient>
public void release(WorkerClient workerClient)
release
in class ResourcePool<WorkerClient>
protected WorkerClient createNewResource()
createNewResource
in class ResourcePool<WorkerClient>
Copyright © 2015. All Rights Reserved.