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.Serializable

Stream session info.

See Also:
  Serialized Form

### Field Summary

Fields
`java.net.InetAddress` `connecting`
`java.net.InetAddress` `peer`
`java.util.Collection<StreamSummary>` `receivingSummaries` Immutable collection of receiving summaries
`java.util.Collection<StreamSummary>` `sendingSummaries` Immutable collection of sending summaries
`int` `sessionIndex`
`StreamSession.State` `state` Current session state

### Constructor Summary

Constructors
Constructor and Description
`SessionInfo(java.net.InetAddress peer, int sessionIndex, java.net.InetAddress connecting, java.util.Collection<StreamSummary> receivingSummaries, java.util.Collection<StreamSummary> sendingSummaries, StreamSession.State state)`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.util.Collection<ProgressInfo>` `getReceivingFiles()`
`java.util.Collection<ProgressInfo>` `getSendingFiles()`
`long` `getTotalFilesReceived()`
`long` `getTotalFilesSent()`
`long` `getTotalFilesToReceive()`
`long` `getTotalFilesToSend()`
`long` `getTotalSizeReceived()`
`long` `getTotalSizeSent()`
`long` `getTotalSizeToReceive()`
`long` `getTotalSizeToSend()`
`boolean` `isFailed()`
`void` `updateProgress(ProgressInfo newProgress)` Update progress of receiving/sending file.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### peer

    public final java.net.InetAddress peer

#### sessionIndex

    public final int sessionIndex

#### connecting

    public final java.net.InetAddress 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.InetAddress peer,
                       int sessionIndex,
                       java.net.InetAddress connecting,
                       java.util.Collection<StreamSummary> receivingSummaries,
                       java.util.Collection<StreamSummary> sendingSummaries,
                       StreamSession.State state)

### Method Detail

#### isFailed

    public boolean isFailed()

#### updateProgress

    public void updateProgress(ProgressInfo newProgress)

Update progress of receiving/sending file.

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