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.locator
Class Ec2MultiRegionSnitch

    java.lang.Object
      org.apache.cassandra.locator.AbstractEndpointSnitch
          org.apache.cassandra.locator.AbstractNetworkTopologySnitch
              org.apache.cassandra.locator.Ec2Snitch
                  org.apache.cassandra.locator.Ec2MultiRegionSnitch

All Implemented Interfaces:
  IEndpointStateChangeSubscriber, IEndpointSnitch

    public class Ec2MultiRegionSnitch

extends Ec2Snitch
implements IEndpointStateChangeSubscriber

1) Snitch will automatically set the public IP by querying the AWS API 2) Snitch will set the private IP as a Gossip application state. 3) Snitch implements IESCS and will reset the connection if it is within the same region to communicate via private IP. Implements Ec2Snitch to inherit its functionality and extend it for Multi-Region. Operational: All the nodes in this cluster needs to be able to (modify the Security group settings in AWS) communicate via Public IP's.

Field Summary

Fields inherited from class org.apache.cassandra.locator.Ec2Snitch
`ec2region, ec2zone, logger, ZONE_NAME_QUERY_URL`

Constructor Summary
`Ec2MultiRegionSnitch()`

Method Summary
`void` | `gossiperStarting()` called after Gossiper instance exists immediately before it starts gossiping
`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 state)` Called whenever a node is restarted.

Methods inherited from class org.apache.cassandra.locator.Ec2Snitch
`getDatacenter, getRack`

Methods inherited from class org.apache.cassandra.locator.AbstractNetworkTopologySnitch
`compareEndpoints`

Methods inherited from class org.apache.cassandra.locator.AbstractEndpointSnitch
`getSortedListByProximity, sortByProximity`

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

Constructor Detail

### Ec2MultiRegionSnitch

    public Ec2MultiRegionSnitch()
                         throws java.io.IOException,
                                ConfigurationException

Throws:
  `java.io.IOException`
  `ConfigurationException`

Method Detail

### 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`

### onRestart

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

  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`

### onRemove

    public void onRemove(java.net.InetAddress endpoint)

  Specified by:
    `onRemove` in interface `IEndpointStateChangeSubscriber`

### gossiperStarting

    public void gossiperStarting()

  Description copied from interface: `IEndpointSnitch`
  called after Gossiper instance exists immediately before it starts gossiping

  Specified by:
    `gossiperStarting` in interface `IEndpointSnitch`
  Overrides:
    `gossiperStarting` in class `Ec2Snitch`

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 © 2013 The Apache Software Foundation