Package org.apache.cassandra.streaming
Class ProgressInfo
- java.lang.Object
-
- org.apache.cassandra.streaming.ProgressInfo
-
- All Implemented Interfaces:
java.io.Serializable
public class ProgressInfo extends java.lang.Object implements java.io.Serializable
ProgressInfo contains stream transfer progress.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProgressInfo.Direction
Direction of the stream.
-
Field Summary
Fields Modifier and Type Field Description long
currentBytes
long
deltaBytes
ProgressInfo.Direction
direction
java.lang.String
fileName
InetAddressAndPort
peer
int
sessionIndex
long
totalBytes
-
Constructor Summary
Constructors Constructor Description ProgressInfo(InetAddressAndPort peer, int sessionIndex, java.lang.String fileName, ProgressInfo.Direction direction, long currentBytes, long deltaBytes, long totalBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
ProgressInfo is considered to be equal only when all attributes except currentBytes are equal.int
hashCode()
boolean
isCompleted()
int
progressPercentage()
java.lang.String
toString()
java.lang.String
toString(boolean withPorts)
-
-
-
Field Detail
-
peer
public final InetAddressAndPort peer
-
sessionIndex
public final int sessionIndex
-
fileName
public final java.lang.String fileName
-
direction
public final ProgressInfo.Direction direction
-
currentBytes
public final long currentBytes
-
deltaBytes
public final long deltaBytes
-
totalBytes
public final long totalBytes
-
-
Constructor Detail
-
ProgressInfo
public ProgressInfo(InetAddressAndPort peer, int sessionIndex, java.lang.String fileName, ProgressInfo.Direction direction, long currentBytes, long deltaBytes, long totalBytes)
-
-
Method Detail
-
isCompleted
public boolean isCompleted()
- Returns:
- true if transfer is completed
-
progressPercentage
public int progressPercentage()
-
equals
public boolean equals(java.lang.Object o)
ProgressInfo is considered to be equal only when all attributes except currentBytes are equal.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(boolean withPorts)
-
-