Interface MasterInterface
- All Superinterfaces:
ProviderInterface, Remote
- All Known Implementing Classes:
MasterServer
The Interface MasterInterface.
-
Method Summary
Modifier and TypeMethodDescriptionGets the data file access interface.getDestination(String name) Gets the destination.getECauthToken(String user) Gets the ecauth token.getETag(long dataTransferId) Gets the ETag for a given dataTransferId.intgetIncomingConnectionCount(String incomingUser) Get the current number of active connections for the specified incoming user across all data movers and protocols.getIncomingProfile(String incomingUser, String incomingPassword, String from) Gets the incoming profile.getIncomingProfileNoAuth(String incomingUser) Returns a fresh IncomingProfile for an already-authenticated user without re-running credential validation, TOTP, connection-count checks, or last-login updates.getIncomingUserHash(String incomingUser) Return a hash of the specified incoming user (the string is in the form userid:password).longgetPortalBytesUsed(String userId, boolean upload, long windowMs) Returns the total bytes transferred by the given portal user within the specified rolling window.getPortalTraffic(String userId, int hours) Gets portal traffic statistics.byte[]getS3AuthorizationSignature(String incomingUser, String prefix, String data, String algorithm) Return a hash of the specified incoming user (the string is in the form userid:password).voidimportDestination(Destination fromDestination, Association[] linkedAssociations, boolean copySharedHost) Import destination from another Master Server.booleanisAnonymousIncomingUser(String incomingUser) Check whether an IncomingUser is configured for anonymous (password-free) access.booleanisValidDataFile(boolean isProxy, long dataFileId) Checks if is valid data file.longproxyHostIsAlive(String name) Proxy host is alive.voidreleaseConnectionSlot(String incomingUser) Releases a pending connection slot for the given user.voidupdateData(Host host) Update data.voidupdateData(String hostId, String data) Update data.voidupdateDataTransfers(DataTransfer[] transfers) Update data transfers.updateDownloadProgress(DownloadProgress[] progress) Update download progress.voidupdateIncomingConnectionIds(String serverName, List<IncomingConnection> incomingConnections) Update incoming connection ids.booleanupdateLocalTransferStatus(String master, boolean standby, String destination, String target, String uniqueName, String status) Update data transfer status from another Master Server.voidupdateLocation(Host host) Update location.Methods inherited from interface ProviderInterface
isAvailable, isRegistred, subscribe
-
Method Details
-
updateIncomingConnectionIds
void updateIncomingConnectionIds(String serverName, List<IncomingConnection> incomingConnections) throws RemoteException Update incoming connection ids.- Parameters:
serverName- the server nameincomingConnections- the incoming connections- Throws:
RemoteException- the remote exception
-
proxyHostIsAlive
Proxy host is alive.- Parameters:
name- the name- Returns:
- the long
- Throws:
RemoteException- the remote exception
-
updateDataTransfers
Update data transfers.- Parameters:
transfers- the transfers- Throws:
RemoteException- the remote exception
-
updateDownloadProgress
Update download progress.- Parameters:
progress- the progress- Returns:
- the list of DownloadProgress to interrupt (not found on the MasterServer)
- Throws:
RemoteException- the remote exception
-
updateData
Update data.- Parameters:
host- the host- Throws:
RemoteException- the remote exception
-
updateData
Update data.- Parameters:
hostId- the host iddata- the host data- Throws:
RemoteException- the remote exception
-
updateLocation
Update location.- Parameters:
host- the host- Throws:
RemoteException- the remote exception
-
getDataFileAccessInterface
Gets the data file access interface.- Returns:
- the data file access interface
- Throws:
RemoteException- the remote exception
-
getDestination
Gets the destination.- Parameters:
name- the name- Returns:
- the destination
- Throws:
RemoteException- the remote exception
-
isValidDataFile
Checks if is valid data file.- Parameters:
isProxy- the is proxydataFileId- the data file id- Returns:
- true, if is valid data file
- Throws:
RemoteException- the remote exception
-
getIncomingUserHash
Return a hash of the specified incoming user (the string is in the form userid:password).- Parameters:
incomingUser- the incoming user- Returns:
- hash, if the user is found
- Throws:
RemoteException- the remote exception
-
isAnonymousIncomingUser
Check whether an IncomingUser is configured for anonymous (password-free) access.- Parameters:
incomingUser- the incoming user name- Returns:
- true if the user exists and has USER_PORTAL_ANONYMOUS set to true
- Throws:
RemoteException- the remote exception
-
getIncomingConnectionCount
Get the current number of active connections for the specified incoming user across all data movers and protocols.- Parameters:
incomingUser- the incoming user name- Returns:
- the active connection count
- Throws:
RemoteException- the remote exception
-
getPortalBytesUsed
Returns the total bytes transferred by the given portal user within the specified rolling window.- Parameters:
userId- the user idupload- true for upload bytes, false for download byteswindowMs- the rolling window in milliseconds- Returns:
- total bytes within the window
- Throws:
RemoteException- if the call fails
-
getPortalTraffic
Gets portal traffic statistics. Returns minute-bucket rows for the given user (or all users if userId is empty), covering the specified number of hours back from now.- Parameters:
userId- the incoming user ID, or empty string for system-widehours- how many hours of history to return- Returns:
- list of PortalTraffic rows ordered by time descending
- Throws:
RemoteException- the remote exception
-
getS3AuthorizationSignature
byte[] getS3AuthorizationSignature(String incomingUser, String prefix, String data, String algorithm) throws RemoteException Return a hash of the specified incoming user (the string is in the form userid:password).- Parameters:
incomingUser- the incoming userprefix- the prefix (e.g. AWS4)data- the dataalgorithm- the algorithm- Returns:
- authorization signature
- Throws:
RemoteException- the remote exception
-
getIncomingProfile
IncomingProfile getIncomingProfile(String incomingUser, String incomingPassword, String from) throws RemoteException Gets the incoming profile.- Parameters:
incomingUser- the incoming userincomingPassword- the incoming passwordfrom- the from- Returns:
- the incoming profile
- Throws:
RemoteException- the remote exception
-
getIncomingProfileNoAuth
Returns a fresh IncomingProfile for an already-authenticated user without re-running credential validation, TOTP, connection-count checks, or last-login updates.- Parameters:
incomingUser- the incoming user id- Returns:
- the incoming profile
- Throws:
RemoteException- the remote exception
-
releaseConnectionSlot
Releases a pending connection slot for the given user. Must be called when a session closes before being confirmed by the incoming connections poll, to prevent the pending counter from leaking.- Parameters:
incomingUser- the incoming user id- Throws:
RemoteException- the remote exception
-
getETag
Gets the ETag for a given dataTransferId.- Parameters:
dataTransferId- the data transfer id- Returns:
- the ETag
- Throws:
RemoteException- the remote exception
-
getECauthToken
Gets the ecauth token.- Parameters:
user- the user- Returns:
- the ecauth token
- Throws:
RemoteException- the remote exception
-
importDestination
void importDestination(Destination fromDestination, Association[] linkedAssociations, boolean copySharedHost) throws RemoteException Import destination from another Master Server.- Parameters:
fromDestination- the from destinationlinkedAssociations- the linked associationscopySharedHost- the copy shared host- Throws:
RemoteException- the remote exception
-
updateLocalTransferStatus
boolean updateLocalTransferStatus(String master, boolean standby, String destination, String target, String uniqueName, String status) throws RemoteException Update data transfer status from another Master Server.- Parameters:
master- the remote masterstandby- the standby flagdestination- the destination nametarget- the target nameuniqueName- the unique namestatus- the status- Returns:
- true, if successful
- Throws:
RemoteException- the remote exception
-