Package org.apache.cassandra.streaming
Class SessionInfo
- java.lang.Object
-
- org.apache.cassandra.streaming.SessionInfo
-
- All Implemented Interfaces:
java.io.Serializable
public final class SessionInfo extends java.lang.Object implements java.io.SerializableStream session info.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description java.net.InetSocketAddressconnectingjava.net.InetSocketAddresspeerjava.util.Collection<StreamSummary>receivingSummariesImmutable collection of receiving summariesjava.util.Collection<StreamSummary>sendingSummariesImmutable collection of sending summariesintsessionIndexStreamSession.StatestateCurrent session state
-
Constructor Summary
Constructors Constructor Description SessionInfo(java.net.InetSocketAddress peer, int sessionIndex, java.net.InetSocketAddress connecting, java.util.Collection<StreamSummary> receivingSummaries, java.util.Collection<StreamSummary> sendingSummaries, StreamSession.State state)SessionInfo(SessionInfo other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SessionSummarycreateSummary()java.util.Collection<ProgressInfo>getReceivingFiles()java.util.Collection<ProgressInfo>getSendingFiles()longgetTotalFilesReceived()longgetTotalFilesSent()longgetTotalFilesToReceive()longgetTotalFilesToSend()longgetTotalSizeReceived()longgetTotalSizeSent()longgetTotalSizeToReceive()longgetTotalSizeToSend()booleanisAborted()booleanisFailed()voidupdateProgress(ProgressInfo newProgress)Update progress of receiving/sending stream.
-
-
-
Field Detail
-
peer
public final java.net.InetSocketAddress peer
-
sessionIndex
public final int sessionIndex
-
connecting
public final java.net.InetSocketAddress connecting
-
receivingSummaries
public final java.util.Collection<StreamSummary> receivingSummaries
Immutable collection of receiving summaries
-
sendingSummaries
public final java.util.Collection<StreamSummary> sendingSummaries
Immutable collection of sending summaries
-
state
public final StreamSession.State state
Current session state
-
-
Constructor Detail
-
SessionInfo
public SessionInfo(java.net.InetSocketAddress peer, int sessionIndex, java.net.InetSocketAddress connecting, java.util.Collection<StreamSummary> receivingSummaries, java.util.Collection<StreamSummary> sendingSummaries, StreamSession.State state)
-
SessionInfo
public SessionInfo(SessionInfo other)
-
-
Method Detail
-
isFailed
public boolean isFailed()
-
isAborted
public boolean isAborted()
-
updateProgress
public void updateProgress(ProgressInfo newProgress)
Update progress of receiving/sending stream.- Parameters:
newProgress- new progress info
-
getReceivingFiles
public java.util.Collection<ProgressInfo> getReceivingFiles()
-
getSendingFiles
public java.util.Collection<ProgressInfo> getSendingFiles()
-
getTotalFilesReceived
public long getTotalFilesReceived()
- Returns:
- total number of files already received.
-
getTotalFilesSent
public long getTotalFilesSent()
- Returns:
- total number of files already sent.
-
getTotalSizeReceived
public long getTotalSizeReceived()
- Returns:
- total size(in bytes) already received.
-
getTotalSizeSent
public long getTotalSizeSent()
- Returns:
- total size(in bytes) already sent.
-
getTotalFilesToReceive
public long getTotalFilesToReceive()
- Returns:
- total number of files to receive in the session
-
getTotalFilesToSend
public long getTotalFilesToSend()
- Returns:
- total number of files to send in the session
-
getTotalSizeToReceive
public long getTotalSizeToReceive()
- Returns:
- total size(in bytes) to receive in the session
-
getTotalSizeToSend
public long getTotalSizeToSend()
- Returns:
- total size(in bytes) to send in the session
-
createSummary
public SessionSummary createSummary()
-
-