@ThreadSafe public final class JobMasterClientPool extends ResourcePool<JobMasterClient>
ResourcePool.acquire()
, ResourcePool.release(Object)
must be called when the
thread is done using the client.mCurrentCapacity, mMaxCapacity, mResources
Constructor and Description |
---|
JobMasterClientPool(JobMasterClientContext context)
Creates a new job master client pool.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the resource pool.
|
JobMasterClient |
createNewResource()
Creates a new resource which will be added to the resource pool after the user is done using
it.
|
acquire, acquire, release, size
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
acquireCloseable, acquireCloseable
public JobMasterClientPool(JobMasterClientContext context)
context
- Job master connection informationpublic void close() throws IOException
ResourcePool
close
in interface Closeable
close
in interface AutoCloseable
close
in class ResourcePool<JobMasterClient>
IOException
public JobMasterClient createNewResource()
ResourcePool
createNewResource
in class ResourcePool<JobMasterClient>
Copyright © 2023. All Rights Reserved.