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 TypeMethodDescriptionvoidclose()Close.longGets the byte sent.longGets the data file.longGets the duration.getRoot()Gets the root.longgetSize()Gets the size.booleanisClosed()Check if it is closed.voidsetByteSent(long byteSent) Sets the byteSent.voidsetDuration(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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
toString
-