ncsa.tools.trebuchet.core.util
Class CopyClientPool
java.lang.Object
ncsa.tools.trebuchet.core.util.CopyClientPool
- All Implemented Interfaces:
- IClient, IConfigurable, Stoppable
- public class CopyClientPool
- extends java.lang.Object
- implements IClient, Stoppable
Responsible for submitting clients to the static thread pool.
A per-operation (per-instance) limit on the number of
clients can be given (default is 5).
Calls the static client factory for the appropriate client. A new client
is constructed for each call, with availability determined by a counting
semaphore, for scalability.
Any optimizations are carried out via the configuration routines
inside the specific client.
- Author:
- arossi
|
Constructor Summary |
CopyClientPool(java.net.URI source,
java.net.URI target)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_POOL_SIZE
public static final int DEFAULT_POOL_SIZE
- See Also:
- Constant Field Values
CopyClientPool
public CopyClientPool(java.net.URI source,
java.net.URI target)
initialize
public void initialize(TrebuchetConfiguration configuration)
throws InitializationException
- Specified by:
initialize in interface IConfigurable
- Throws:
InitializationException
submit
public void submit(ReverseLookupEntry entry)
throws FatalErrorDuringOperationException
- Throws:
FatalErrorDuringOperationException
registerAsActive
public void registerAsActive(edu.emory.mathcs.backport.java.util.concurrent.Future future,
CopyClient client)
release
public void release(edu.emory.mathcs.backport.java.util.concurrent.Future future)
close
public void close()
- Specified by:
close in interface IClient
halt
public void halt()
- Description copied from interface:
Stoppable
- User-defined method for allowing the run() method (or some other
continuous looping process) to exit peacefully.
- Specified by:
halt in interface Stoppable
setCallback
public void setCallback(IOperationMonitor callback)
getUriPair
public java.net.URI[] getUriPair()