Class LiveTransferSample
java.lang.Object
ecmwf.ecpds.master.LiveTransferSample
- All Implemented Interfaces:
Serializable
The Class LiveTransferSample.
Lightweight, generic snapshot of an in-progress (or just-finished) data transfer, pushed periodically from a
DataMover to the MasterServer so that it can be broadcast to "Live ECPDS Earth" globe visualisation clients. This is
intentionally decoupled from ECPDS's internal transfer machinery: it only carries the information the visualisation
needs (who/what/where/how-fast/how-much), not full DataTransfer/Host objects.
@JsonIgnoreProperties(ignoreUnknown = true) is required here: isTerminal() is a derived getter (no
backing field, not a constructor parameter), but Jackson's default bean introspection still serialises it as a
"terminal" JSON property on the way out. A Continental/Proxy Data Mover pushing samples over its REST relay (see
RESTClient#updateLiveTransferStatistics) round-trips through actual JSON, unlike a regular, RMI-connected
Data Mover (native Java serialization) - without this annotation, the MasterServer's @JsonCreator constructor
(which has no "terminal" parameter) rejects that field as unrecognised and the whole batch is dropped, silently
losing every sample a Continental Mover reports.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDirection: data pulled in from an Acquisition Host.static final StringDirection: data pushed out to a Dissemination Host.static final StringStatus: transfer is currently in progress.static final StringStatus: transfer completed successfully.static final StringStatus: transfer failed/was retried. -
Constructor Summary
ConstructorsConstructorDescriptionLiveTransferSample(long transferId, String moverName, String destinationName, String hostName, String hostNickname, String hostAddress, String protocol, long fileSize, long byteSent, long duration, double rateBitsPerSecond, String status, String direction, String hostType) Instantiates a new live transfer sample.LiveTransferSample(long transferId, String moverName, String destinationName, String hostName, String hostNickname, String hostAddress, String protocol, long fileSize, long byteSent, long duration, double rateBitsPerSecond, String status, String direction, String hostType, Long timestamp, String attemptId) -
Method Summary
Modifier and TypeMethodDescriptionlonglongIdentity of a movement, not merely the database transfer reused by successive legs/retries.longdoublelonglongbooleantoString()To string.withAttempt(String attempt)
-
Field Details
-
STATUS_ACTIVE
-
STATUS_DONE
-
STATUS_FAILED
-
DIRECTION_DISSEMINATION
Direction: data pushed out to a Dissemination Host.- See Also:
-
DIRECTION_ACQUISITION
Direction: data pulled in from an Acquisition Host.- See Also:
-
-
Constructor Details
-
LiveTransferSample
public LiveTransferSample(long transferId, String moverName, String destinationName, String hostName, String hostNickname, String hostAddress, String protocol, long fileSize, long byteSent, long duration, double rateBitsPerSecond, String status, String direction, String hostType) Instantiates a new live transfer sample.- Parameters:
transferId- the transfer idmoverName- the mover namedestinationName- the destination namehostName- the host namehostNickname- the host nickname (display name, falls back to hostName when blank)hostAddress- the host's actual network address (hostname or IP), used for GeoIP resolutionprotocol- the protocolfileSize- the file sizebyteSent- the byte sentduration- the durationrateBitsPerSecond- the rate bits per secondstatus- the statusdirection- one ofDIRECTION_DISSEMINATIONorDIRECTION_ACQUISITION; defaults toDIRECTION_DISSEMINATIONifnullhostType- the target/source Host's actual type (seehostType); may benull
-
LiveTransferSample
public LiveTransferSample(long transferId, String moverName, String destinationName, String hostName, String hostNickname, String hostAddress, String protocol, long fileSize, long byteSent, long duration, double rateBitsPerSecond, String status, String direction, String hostType, Long timestamp, String attemptId)
-
-
Method Details
-
withAttempt
-
getAttemptId
-
getEventKey
Identity of a movement, not merely the database transfer reused by successive legs/retries. -
getTransferId
public long getTransferId() -
getMoverName
-
getDestinationName
-
getHostName
-
getHostNickname
-
getHostAddress
-
getProtocol
-
getFileSize
public long getFileSize() -
getByteSent
public long getByteSent() -
getDuration
public long getDuration() -
getRateBitsPerSecond
public double getRateBitsPerSecond() -
getStatus
-
getDirection
-
getHostType
-
getTimestamp
public long getTimestamp() -
isTerminal
public boolean isTerminal() -
toString
-