Groovy Documentation

org.hidetake.gradle.ssh.internal.operation
[Groovy] Class FileTransferLogger.Status

java.lang.Object
  org.hidetake.gradle.ssh.internal.operation.FileTransferLogger.Status

@TupleConstructor
static class FileTransferLogger.Status

Represents transferred bytes and elapsed time.


Property Summary
long lastCheckPointTime

Timestamp in milliseconds when the last checkpoint is committed.

long maxSize

Estimated bytes to transfer.

long startedTime

Timestamp in milliseconds when transfer is started.

long transferredSize

Actually transferred bytes.

 
Method Summary
void checkPoint()

Commit a checkpoint.

static long currentTime()

long getElapsedTime()

Return elapsed time in milliseconds from started

long getElapsedTimeFromCheckPoint()

Return elapsed time in milliseconds from the last checkpoint

double getKiloBytesPerSecond()

Return transfer rate in kbps.

double getPercent()

Return percent of transferred data.

Status leftShift(long size)

Report the progress that data has been transferred.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Property Detail

lastCheckPointTime

long lastCheckPointTime
Timestamp in milliseconds when the last checkpoint is committed.


maxSize

final long maxSize
Estimated bytes to transfer.


startedTime

final long startedTime
Timestamp in milliseconds when transfer is started.


transferredSize

long transferredSize
Actually transferred bytes.


 
Method Detail

checkPoint

void checkPoint()
Commit a checkpoint.


currentTime

static long currentTime()


getElapsedTime

long getElapsedTime()
Return elapsed time in milliseconds from started
Returns:
elapsed time in milliseconds from started


getElapsedTimeFromCheckPoint

long getElapsedTimeFromCheckPoint()
Return elapsed time in milliseconds from the last checkpoint
Returns:
elapsed time in milliseconds from the last checkpoint


getKiloBytesPerSecond

double getKiloBytesPerSecond()
Return transfer rate in kbps.
Returns:
transfer rate in kbps


getPercent

double getPercent()
Return percent of transferred data.
Returns:
percent of transferred data


leftShift

Status leftShift(long size)
Report the progress that data has been transferred.
Returns:
this instance
Parameters:
size - transferred size in bytes


 

Groovy Documentation