Interface MoverInterface

All Superinterfaces:
ClientInterface, Remote
All Known Implementing Classes:
MoverServer

public interface MoverInterface extends ClientInterface
The Interface MoverInterface.
  • Method Details

    • size

      long size(DataTransfer transfer, String fileName) throws RemoteException
      Size.
      Parameters:
      transfer - the transfer
      fileName - the file name
      Returns:
      the long
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • del

      void del(DataTransfer transfer, String fileName) throws RemoteException
      Del.
      Parameters:
      transfer - the transfer
      fileName - the file name
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • del

      boolean del(Host proxyHost, DataFile dataFile) throws RemoteException
      Del.
      Parameters:
      proxyHost - the proxy host
      dataFile - the data file
      Returns:
      true, if successful
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • purge

      void purge(List<ExistingStorageDirectory> directories) throws RemoteException
      Purge.
      Parameters:
      directories - the directories
      Throws:
      RemoteException - the remote exception
    • purge

      void purge(Host proxyHost, List<ExistingStorageDirectory> directories) throws RemoteException
      Purge.
      Parameters:
      proxyHost - the proxy host
      directories - 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 source
      transfer - the transfer
      fileName - the file name
      localPosn - the local posn
      remotePosn - the remote posn
      Returns:
      the data transfer
      Throws:
      ECtransException - the ectrans exception
      SourceNotAvailableException - the source not available exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • put

      ProxySocket put(Host host, String target, long remotePosn, long size) throws RemoteException
      Puts the.
      Parameters:
      host - the host
      target - the target
      remotePosn - the remote posn
      size - the size
      Returns:
      the proxy socket
      Throws:
      ECtransException - the ectrans exception
      IOException - 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 host
      source - the source
      remotePosn - the remote posn
      removeOriginal - the remove original
      Returns:
      the proxy socket
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • get

      ProxySocket get(DataFile dataFile, Host hostForSource, long remotePosn) throws RemoteException
      Gets the.
      Parameters:
      dataFile - the data file
      hostForSource - the host for source
      remotePosn - the remote posn
      Returns:
      the proxy socket
      Throws:
      SourceNotAvailableException - the source not available exception
      IOException - 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 file
      hostForSource - the host for source
      remotePosn - the remote posn
      length - the length
      Returns:
      the proxy socket
      Throws:
      SourceNotAvailableException - the source not available exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • size

      long size(Host host, String source) throws RemoteException
      Size.
      Parameters:
      host - the host
      source - the source
      Returns:
      the long
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • del

      void del(Host host, String source) throws RemoteException
      Del.
      Parameters:
      host - the host
      source - the source
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • mkdir

      void mkdir(Host host, String dir) throws RemoteException
      Mkdir.
      Parameters:
      host - the host
      dir - the dir
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • rmdir

      void rmdir(Host host, String dir) throws RemoteException
      Rmdir.
      Parameters:
      host - the host
      dir - the dir
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • listAsStringArray

      String[] listAsStringArray(Host host, String source, String pattern) throws RemoteException
      List.
      Parameters:
      host - the host
      source - the source
      pattern - the pattern
      Returns:
      the string[]
      Throws:
      ECtransException - the ectrans exception
      IOException - 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 host
      directory - the directory
      pattern - the pattern
      synchronous - the synchronous
      Returns:
      the remote input stream
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • execute

      RemoteInputStream execute(String script) throws RemoteException
      Execute.
      Parameters:
      script - the script
      Returns:
      the remote input stream
      Throws:
      ScriptException - the script exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • fetchUrlContent

      String fetchUrlContent(Host host, String source, int maxBytes) throws RemoteException
      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 retrieval
      source - the remote URL or path to retrieve
      maxBytes - maximum number of bytes to return
      Returns:
      the content as a String
      Throws:
      RemoteException - the remote exception
    • move

      void move(Host host, String source, String target) throws RemoteException
      Move.
      Parameters:
      host - the host
      source - the source
      target - the target
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • close

      boolean close(DataTransfer transfer) throws RemoteException
      Close.
      Parameters:
      transfer - the transfer
      Returns:
      true, if successful
      Throws:
      ECtransException - the ectrans exception
      IOException - 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 file
      targetHost - the target host
      hostsForSource - the hosts for source
      Returns:
      the data file
      Throws:
      ECtransException - the ectrans exception
      SourceNotAvailableException - the source not available exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • download

      DataFile download(DataFile dataFile, Host hostForSource) throws RemoteException
      Download.
      Parameters:
      dataFile - the data file
      hostForSource - the host for source
      Returns:
      the data file
      Throws:
      SourceNotAvailableException - the source not available exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • filter

      DataFile filter(DataFile dataFile, boolean remove) throws RemoteException
      Filter.
      Parameters:
      dataFile - the data file
      remove - the remove
      Returns:
      the data file
      Throws:
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • del

      boolean del(DataFile dataFile) throws RemoteException
      Del.
      Parameters:
      dataFile - the data file
      Returns:
      true, if successful
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • check

      void check(long ticket) throws RemoteException
      Check.
      Parameters:
      ticket - the ticket
      Throws:
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • getMoverReport

      String getMoverReport(Host proxyHost) throws RemoteException
      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

      String getHostReport(Host proxyHost, Host host) throws RemoteException
      Gets the host report.
      Parameters:
      proxyHost - the proxy host
      host - the host
      Returns:
      the host report
      Throws:
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • getReport

      String getReport() throws RemoteException
      Gets the report.
      Returns:
      the report
      Throws:
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • getReport

      String getReport(Host host) throws RemoteException
      Gets the report.
      Parameters:
      host - the host
      Returns:
      the report
      Throws:
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • getIncomingConnectionIds

      String[] getIncomingConnectionIds() throws RemoteException
      Gets the incoming connection ids.
      Returns:
      the incoming connection ids
      Throws:
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • getIncomingConnections

      List<IncomingConnection> getIncomingConnections() throws RemoteException
      Gets the incoming connections.
      Returns:
      the incoming connections
      Throws:
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • closeIncomingConnection

      boolean closeIncomingConnection(String id) throws RemoteException
      Close incoming connection.
      Parameters:
      id - the id
      Returns:
      true, if successful
      Throws:
      IOException - Signals that an I/O exception has occurred.
      RemoteException
    • invalidatePortalSessionsForUser

      int invalidatePortalSessionsForUser(String user) throws RemoteException
      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

      void invalidatePortalSession(String token) throws RemoteException
      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

      String resolvePortalSession(String token) throws RemoteException
      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 null if not found or expired
      Throws:
      RemoteException - the remote exception
    • closeAllIncomingConnections

      void closeAllIncomingConnections() throws RemoteException
      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 topic
      qos - the qos
      expiryInterval - the expiry interval
      contentType - the content type
      clientId - the client id
      payload - the payload
      retain - the retain
      Throws:
      RemoteException - the remote exception
    • removeFromMQTTBroker

      void removeFromMQTTBroker(String topic) throws RemoteException
      Remove a retained notification from the MQTT broker.
      Parameters:
      topic - the topic
      Throws:
      RemoteException - the remote exception
    • getMQTTClientsCount

      int getMQTTClientsCount() throws RemoteException
      Get the number of client connected to the MQTT broker.
      Returns:
      the MQTT clients count
      Throws:
      RemoteException - the remote exception
    • shutdown

      void shutdown(boolean graceful, boolean restart) throws RemoteException
      Shutdown.
      Parameters:
      graceful - the graceful
      restart - the restart
      Throws:
      RemoteException - the remote exception
    • getECproxyAddressAndPort

      String getECproxyAddressAndPort() throws RemoteException
      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

      long[][] computeVolumeUsage(int volumeIndexMax) throws RemoteException
      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