Interface MoverInterface
- All Superinterfaces:
ClientInterface, Remote
- All Known Implementing Classes:
MoverServer
The Interface MoverInterface.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcheck(long ticket) Check.booleanclose(DataTransfer transfer) Close.voidClose all incoming connections.booleanClose incoming connection.long[][]computeVolumeUsage(int volumeIndexMax) Compute the used and total capacity for each file system in the data repository.booleanDel.voiddel(DataTransfer transfer, String fileName) Del.booleanDel.voidDel.Download.Execute.fetchUrlContent(Host host, String source, int maxBytes) Fetch the raw content of a remote URL/path via the host's configured ECtrans module.Filter.Gets the.Gets the.Gets the.Gets the ECproxy plugging listen address and port.getHostReport(Host proxyHost, Host host) Gets the host report.String[]Gets the incoming connection ids.Gets the incoming connections.getMoverReport(Host proxyHost) Gets the mover report.intGet the number of client connected to the MQTT broker.Gets the report.Gets the report.voidinvalidatePortalSession(String token) Invalidate a single portal session token in this mover's local session cache, if present.intInvalidate all portal HTTPS session tokens for the given user, forcing re-authentication on the next browser request.listAsByteArray(Host host, String directory, String pattern, boolean synchronous) List2.String[]listAsStringArray(Host host, String source, String pattern) List.voidMkdir.voidMove.voidpublishToMQTTBroker(String topic, int qos, long expiryInterval, String contentType, String clientId, String payload, boolean retain) Publish a notification to the MQTT service.voidpurge(Host proxyHost, List<ExistingStorageDirectory> directories) Purge.voidpurge(List<ExistingStorageDirectory> directories) Purge.put(Host[] hostsForSource, DataTransfer transfer, String fileName, long localPosn, long remotePosn) Puts the.Puts the.voidremoveFromMQTTBroker(String topic) Remove a retained notification from the MQTT broker.Replicate.resolvePortalSession(String token) Look up a portal session token in this mover's local session cache.voidRmdir.voidshutdown(boolean graceful, boolean restart) Shutdown.longsize(DataTransfer transfer, String fileName) Size.longSize.Methods inherited from interface ClientInterface
getPassword, getRoot, getService
-
Method Details
-
size
Size.- Parameters:
transfer- the transferfileName- the file name- Returns:
- the long
- Throws:
ECtransException- the ectrans exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
del
Del.- Parameters:
transfer- the transferfileName- the file name- Throws:
ECtransException- the ectrans exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
del
Del.- Parameters:
proxyHost- the proxy hostdataFile- the data file- Returns:
- true, if successful
- Throws:
ECtransException- the ectrans exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
purge
Purge.- Parameters:
directories- the directories- Throws:
RemoteException- the remote exception
-
purge
Purge.- Parameters:
proxyHost- the proxy hostdirectories- the directories- Throws:
RemoteException- the remote exception
-
put
DataTransfer put(Host[] hostsForSource, DataTransfer transfer, String fileName, long localPosn, long remotePosn) throws RemoteException Puts the.- Parameters:
hostsForSource- the hosts for sourcetransfer- the transferfileName- the file namelocalPosn- the local posnremotePosn- the remote posn- Returns:
- the data transfer
- Throws:
ECtransException- the ectrans exceptionSourceNotAvailableException- the source not available exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
put
Puts the.- Parameters:
host- the hosttarget- the targetremotePosn- the remote posnsize- the size- Returns:
- the proxy socket
- Throws:
ECtransException- the ectrans exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
get
ProxySocket get(Host host, String source, long remotePosn, boolean removeOriginal) throws RemoteException Gets the.- Parameters:
host- the hostsource- the sourceremotePosn- the remote posnremoveOriginal- the remove original- Returns:
- the proxy socket
- Throws:
ECtransException- the ectrans exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
get
Gets the.- Parameters:
dataFile- the data filehostForSource- the host for sourceremotePosn- the remote posn- Returns:
- the proxy socket
- Throws:
SourceNotAvailableException- the source not available exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
get
ProxySocket get(DataFile dataFile, Host[] hostForSource, long remotePosn, long length) throws RemoteException Gets the.- Parameters:
dataFile- the data filehostForSource- the host for sourceremotePosn- the remote posnlength- the length- Returns:
- the proxy socket
- Throws:
SourceNotAvailableException- the source not available exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
size
Size.- Parameters:
host- the hostsource- the source- Returns:
- the long
- Throws:
ECtransException- the ectrans exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
del
Del.- Parameters:
host- the hostsource- the source- Throws:
ECtransException- the ectrans exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
mkdir
Mkdir.- Parameters:
host- the hostdir- the dir- Throws:
ECtransException- the ectrans exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
rmdir
Rmdir.- Parameters:
host- the hostdir- the dir- Throws:
ECtransException- the ectrans exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
listAsStringArray
List.- Parameters:
host- the hostsource- the sourcepattern- the pattern- Returns:
- the string[]
- Throws:
ECtransException- the ectrans exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
listAsByteArray
RemoteInputStream listAsByteArray(Host host, String directory, String pattern, boolean synchronous) throws RemoteException List2.- Parameters:
host- the hostdirectory- the directorypattern- the patternsynchronous- the synchronous- Returns:
- the remote input stream
- Throws:
ECtransException- the ectrans exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
execute
Execute.- Parameters:
script- the script- Returns:
- the remote input stream
- Throws:
ScriptException- the script exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
fetchUrlContent
Fetch the raw content of a remote URL/path via the host's configured ECtrans module. Returns the content as a plain String (truncated to maxBytes if needed).- Parameters:
host- the host whose ECtrans module is used for retrievalsource- the remote URL or path to retrievemaxBytes- maximum number of bytes to return- Returns:
- the content as a String
- Throws:
RemoteException- the remote exception
-
move
Move.- Parameters:
host- the hostsource- the sourcetarget- the target- Throws:
ECtransException- the ectrans exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
close
Close.- Parameters:
transfer- the transfer- Returns:
- true, if successful
- Throws:
ECtransException- the ectrans exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
replicate
DataFile replicate(DataFile dataFile, Host targetHost, Host[] hostsForSource) throws RemoteException Replicate.- Parameters:
dataFile- the data filetargetHost- the target hosthostsForSource- the hosts for source- Returns:
- the data file
- Throws:
ECtransException- the ectrans exceptionSourceNotAvailableException- the source not available exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
download
Download.- Parameters:
dataFile- the data filehostForSource- the host for source- Returns:
- the data file
- Throws:
SourceNotAvailableException- the source not available exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
filter
Filter.- Parameters:
dataFile- the data fileremove- the remove- Returns:
- the data file
- Throws:
IOException- Signals that an I/O exception has occurred.RemoteException
-
del
Del.- Parameters:
dataFile- the data file- Returns:
- true, if successful
- Throws:
ECtransException- the ectrans exceptionIOException- Signals that an I/O exception has occurred.RemoteException
-
check
Check.- Parameters:
ticket- the ticket- Throws:
IOException- Signals that an I/O exception has occurred.RemoteException
-
getMoverReport
Gets the mover report.- Parameters:
proxyHost- the proxy host- Returns:
- the mover report
- Throws:
IOException- Signals that an I/O exception has occurred.RemoteException
-
getHostReport
Gets the host report.- Parameters:
proxyHost- the proxy hosthost- the host- Returns:
- the host report
- Throws:
IOException- Signals that an I/O exception has occurred.RemoteException
-
getReport
Gets the report.- Returns:
- the report
- Throws:
IOException- Signals that an I/O exception has occurred.RemoteException
-
getReport
Gets the report.- Parameters:
host- the host- Returns:
- the report
- Throws:
IOException- Signals that an I/O exception has occurred.RemoteException
-
getIncomingConnectionIds
Gets the incoming connection ids.- Returns:
- the incoming connection ids
- Throws:
IOException- Signals that an I/O exception has occurred.RemoteException
-
getIncomingConnections
Gets the incoming connections.- Returns:
- the incoming connections
- Throws:
IOException- Signals that an I/O exception has occurred.RemoteException
-
closeIncomingConnection
Close incoming connection.- Parameters:
id- the id- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.RemoteException
-
invalidatePortalSessionsForUser
Invalidate all portal HTTPS session tokens for the given user, forcing re-authentication on the next browser request. Called when the user's configuration changes (e.g. Portal Service mode).- Parameters:
user- the data user login name- Returns:
- the number of sessions removed
- Throws:
RemoteException- the remote exception
-
invalidatePortalSession
Invalidate a single portal session token in this mover's local session cache, if present. Used by the Master Server to propagate a user-initiated logout to all other movers that may have imported the token via cross-mover session migration.- Parameters:
token- the portal session token to invalidate- Throws:
RemoteException- the remote exception
-
resolvePortalSession
Look up a portal session token in this mover's local session cache. Used by the Master Server to locate a token that was originally issued on a different mover (e.g. after a load-balancer failover).If the token is found and has not expired, the session entry is serialised as a single-line string in the format:
user TAB subscriberId TAB subscriberEmail TAB expiryEpochMs
The caller is responsible for importing the entry into its own local cache.- Parameters:
token- the portal session token to resolve- Returns:
- the serialised session entry, or
nullif not found or expired - Throws:
RemoteException- the remote exception
-
closeAllIncomingConnections
Close all incoming connections.- Throws:
IOException- Signals that an I/O exception has occurred.RemoteException
-
publishToMQTTBroker
void publishToMQTTBroker(String topic, int qos, long expiryInterval, String contentType, String clientId, String payload, boolean retain) throws RemoteException Publish a notification to the MQTT service.- Parameters:
topic- the topicqos- the qosexpiryInterval- the expiry intervalcontentType- the content typeclientId- the client idpayload- the payloadretain- the retain- Throws:
RemoteException- the remote exception
-
removeFromMQTTBroker
Remove a retained notification from the MQTT broker.- Parameters:
topic- the topic- Throws:
RemoteException- the remote exception
-
getMQTTClientsCount
Get the number of client connected to the MQTT broker.- Returns:
- the MQTT clients count
- Throws:
RemoteException- the remote exception
-
shutdown
Shutdown.- Parameters:
graceful- the gracefulrestart- the restart- Throws:
RemoteException- the remote exception
-
getECproxyAddressAndPort
Gets the ECproxy plugging listen address and port. This is used by the Master Server to update the "TransferServer" entry in the database when the Mover subscribe. This address and port are used when the Master Server send the address of the allocated Mover to the ecpds command.- Returns:
- the ECproxyPlugin address and port
- Throws:
RemoteException- the remote exception
-
computeVolumeUsage
Compute the used and total capacity for each file system in the data repository.- Parameters:
volumeIndexMax- the volume index max- Returns:
- a 2-element array: [usedPerVolume[], maxCapacityPerVolume[]]
- Throws:
RemoteException- the remote exception
-