Class DownloadProgress
java.lang.Object
ecmwf.ecpds.master.DownloadProgress
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
The Class DownloadProgress.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDownloadProgress
(String root, long dataFileId, long size, long duration, long byteSent, Closeable caller) Instantiates a new download progress. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close.long
Gets the byte sent.long
Gets the data file.long
Gets the duration.getRoot()
Gets the root.long
getSize()
Gets the size.boolean
isClosed()
Check if it is closed.void
setByteSent
(long byteSent) Sets the byteSent.void
setDuration
(long duration) Sets the duration.toString()
To string.
-
Constructor Details
-
DownloadProgress
public DownloadProgress(String root, long dataFileId, long size, long duration, long byteSent, Closeable caller) Instantiates a new download progress.- Parameters:
root
- the rootdataFileId
- the data file idsize
- the sizeduration
- the durationbyteSent
- the byte sentcaller
- something to close
-
-
Method Details
-
getRoot
-
getDataFileId
public long getDataFileId()Gets the data file.- Returns:
- the data file
-
getSize
public long getSize()Gets the size.- Returns:
- the size
-
setDuration
public void setDuration(long duration) Sets the duration.- Parameters:
duration
- the duration
-
getDuration
public long getDuration()Gets the duration.- Returns:
- the duration
-
setByteSent
public void setByteSent(long byteSent) Sets the byteSent.- Parameters:
byteSent
- the byte sent
-
getByteSent
public long getByteSent()Gets the byte sent.- Returns:
- the byte sent
-
isClosed
public boolean isClosed()Check if it is closed.- Returns:
- closed?
-
close
public void close()Close.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
toString
-