org.apache.cassandra.dht

## Class RangeStreamer

- java.lang.Object
- - org.apache.cassandra.dht.RangeStreamer

-     public class RangeStreamer
      extends java.lang.Object

  Assists in streaming ranges to a node.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `RangeStreamer.ExcludeLocalNodeFilter` Source filter which excludes the current node from source calculations
    `static class` | `RangeStreamer.FailureDetectorSourceFilter` Source filter which excludes any endpoints that are not alive according to a failure detector.
    `static interface` | `RangeStreamer.ISourceFilter` A filter applied to sources to stream from when constructing a fetch map.
    `static class` | `RangeStreamer.SingleDatacenterFilter` Source filter which excludes any endpoints that are not in a specific data center.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RangeStreamer(TokenMetadata metadata, java.util.Collection<Token> tokens, java.net.InetAddress address, java.lang.String description, boolean useStrictConsistency, IEndpointSnitch snitch, StreamStateStore stateStore)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRanges(java.lang.String keyspaceName, java.util.Collection<Range<Token>> ranges)` Add ranges to be streamed for given keyspace.
    `void` | `addSourceFilter(RangeStreamer.ISourceFilter filter)`
    `StreamResultFuture` | `fetchAsync()`
    `static com.google.common.collect.Multimap<java.net.InetAddress,Range<Token>>` | `getWorkMap(com.google.common.collect.Multimap<Range<Token>,java.net.InetAddress> rangesWithSourceTarget, java.lang.String keyspace, IFailureDetector fd, boolean useStrictConsistency)`

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

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

- - ### Constructor Detail

    - #### RangeStreamer

          public RangeStreamer(TokenMetadata metadata,
                               java.util.Collection<Token> tokens,
                               java.net.InetAddress address,
                               java.lang.String description,
                               boolean useStrictConsistency,
                               IEndpointSnitch snitch,
                               StreamStateStore stateStore)

  - ### Method Detail

    - #### addSourceFilter

          public void addSourceFilter(RangeStreamer.ISourceFilter filter)

    - #### addRanges

          public void addRanges(java.lang.String keyspaceName,
                                java.util.Collection<Range<Token>> ranges)

      Add ranges to be streamed for given keyspace.
      Parameters:
        `keyspaceName` - keyspace name
        `ranges` - ranges to be streamed

    - #### getWorkMap

          public static com.google.common.collect.Multimap<java.net.InetAddress,Range<Token>> getWorkMap(com.google.common.collect.Multimap<Range<Token>,java.net.InetAddress> rangesWithSourceTarget,
                                                                                                         java.lang.String keyspace,
                                                                                                         IFailureDetector fd,
                                                                                                         boolean useStrictConsistency)

    - #### fetchAsync

          public StreamResultFuture fetchAsync()

Copyright © 2018 The Apache Software Foundation