StreamOutSession (apache-cassandra API)
Date: 2012-05-04

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.streaming
Class StreamOutSession

    java.lang.Object
      org.apache.cassandra.streaming.StreamOutSession

All Implemented Interfaces:
  IEndpointStateChangeSubscriber, IFailureDetectionEventListener

    public class StreamOutSession

extends java.lang.Object
implements IEndpointStateChangeSubscriber, IFailureDetectionEventListener

This class manages the streaming of multiple files one after the other.

Field Summary
`java.lang.String` | `table`

Method Summary
`void` | `addFilesToStream(java.util.List<PendingFile> pendingFiles)`
`void` | `begin()`
`void` | `close()`
`void` | `convict(java.net.InetAddress endpoint, double phi)` Convict the specified endpoint.
`static StreamOutSession` | `create(java.lang.String table, java.net.InetAddress host, long sessionId)`
`static StreamOutSession` | `create(java.lang.String table, java.net.InetAddress host, long sessionId, java.lang.Runnable callback)`
`static StreamOutSession` | `create(java.lang.String table, java.net.InetAddress host, java.lang.Runnable callback)`
`static StreamOutSession` | `get(java.net.InetAddress host, long sessionId)`
`static java.util.Set<java.net.InetAddress>` | `getDestinations()`
`java.util.Collection<PendingFile>` | `getFiles()`
`java.net.InetAddress` | `getHost()`
`static java.util.List<PendingFile>` | `getOutgoingFiles(java.net.InetAddress host)`
`long` | `getSessionId()`
`void` | `onAlive(java.net.InetAddress endpoint, EndpointState state)`
`void` | `onChange(java.net.InetAddress endpoint, ApplicationState state, VersionedValue value)`
`void` | `onDead(java.net.InetAddress endpoint, EndpointState state)`
`void` | `onJoin(java.net.InetAddress endpoint, EndpointState epState)` Use to inform interested parties about the change in the state for specified endpoint
`void` | `onRemove(java.net.InetAddress endpoint)`
`void` | `onRestart(java.net.InetAddress endpoint, EndpointState epState)` Called whenever a node is restarted.
`void` | `retry()`
`void` | `startNext()`
`void` | `validateCurrentFile(java.lang.String file)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### table

    public final java.lang.String table

Method Detail

### create

    public static StreamOutSession create(java.lang.String table,
                                          java.net.InetAddress host,
                                          java.lang.Runnable callback)

### create

    public static StreamOutSession create(java.lang.String table,
                                          java.net.InetAddress host,
                                          long sessionId)

### create

    public static StreamOutSession create(java.lang.String table,
                                          java.net.InetAddress host,
                                          long sessionId,
                                          java.lang.Runnable callback)

### get

    public static StreamOutSession get(java.net.InetAddress host,
                                       long sessionId)

### getHost

    public java.net.InetAddress getHost()

### getSessionId

    public long getSessionId()

### addFilesToStream

    public void addFilesToStream(java.util.List<PendingFile> pendingFiles)

### retry

    public void retry()

### startNext

    public void startNext()
                   throws java.io.IOException

  Throws:
    `java.io.IOException`

### close

    public void close()

### getFiles

    public java.util.Collection<PendingFile> getFiles()

### getDestinations

    public static java.util.Set<java.net.InetAddress> getDestinations()

### getOutgoingFiles

    public static java.util.List<PendingFile> getOutgoingFiles(java.net.InetAddress host)

### validateCurrentFile

    public void validateCurrentFile(java.lang.String file)

### begin

    public void begin()

### onJoin

    public void onJoin(java.net.InetAddress endpoint,
                       EndpointState epState)

  Description copied from interface: `IEndpointStateChangeSubscriber`
  Use to inform interested parties about the change in the state for specified endpoint

  Specified by:
    `onJoin` in interface `IEndpointStateChangeSubscriber`
  Parameters:
    `endpoint` - endpoint for which the state change occurred.
    `epState` - state that actually changed for the above endpoint.

### onChange

    public void onChange(java.net.InetAddress endpoint,
                         ApplicationState state,
                         VersionedValue value)

  Specified by:
    `onChange` in interface `IEndpointStateChangeSubscriber`

### onAlive

    public void onAlive(java.net.InetAddress endpoint,
                        EndpointState state)

  Specified by:
    `onAlive` in interface `IEndpointStateChangeSubscriber`

### onDead

    public void onDead(java.net.InetAddress endpoint,
                       EndpointState state)

  Specified by:
    `onDead` in interface `IEndpointStateChangeSubscriber`

### onRemove

    public void onRemove(java.net.InetAddress endpoint)

  Specified by:
    `onRemove` in interface `IEndpointStateChangeSubscriber`

### onRestart

    public void onRestart(java.net.InetAddress endpoint,
                          EndpointState epState)

  Description copied from interface: `IEndpointStateChangeSubscriber`
  Called whenever a node is restarted. Note that there is no guarantee when that happens that the node was previously marked down. It will have only if `state.isAlive() == false` as `state` is from before the restarted node is marked up.

  Specified by:
    `onRestart` in interface `IEndpointStateChangeSubscriber`

### convict

    public void convict(java.net.InetAddress endpoint,
                        double phi)

  Description copied from interface: `IFailureDetectionEventListener`
  Convict the specified endpoint.

  Specified by:
    `convict` in interface `IFailureDetectionEventListener`
  Parameters:
    `endpoint` - endpoint to be convicted
    `phi` - the value of phi with with ep was convicted

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 The Apache Software Foundation