org.apache.ignite.streamer.router

## Class StreamerLocalEventRouter

- java.lang.Object
- - org.apache.ignite.streamer.router.StreamerLocalEventRouter

All Implemented Interfaces:
  StreamerEventRouter

    public class StreamerLocalEventRouter
    extends Object
    implements StreamerEventRouter

Local router. Always routes event to local node.

### Constructor Summary

Constructors
Constructor and Description
`StreamerLocalEventRouter()`

### Method Summary

Methods
`<T> Map<ClusterNode,Collection<T>>` `route(StreamerContext ctx, String stageName, Collection<T> evts)` Selects a node for given events that should be processed by a stage with given name.
`<T> ClusterNode` `route(StreamerContext ctx, String stageName, T evt)` Selects a node for given event that should be processed by a stage with given name.

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

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

### Constructor Detail

#### StreamerLocalEventRouter

    public StreamerLocalEventRouter()

### Method Detail

#### route

    public <T> ClusterNode route(StreamerContext ctx,
                        String stageName,
                        T evt)

Selects a node for given event that should be processed by a stage with given name.

Specified by:
  `route` in interface `StreamerEventRouter`
Parameters:
  `ctx` - Streamer context.
  `stageName` - Stage name.
  `evt` - Event to route.
Returns:
  Node to route to. If this method returns `null` then the whole pipeline execution will be terminated. All running and ongoing stages for pipeline execution will be cancelled.

#### route

    public <T> Map<ClusterNode,Collection<T>> route(StreamerContext ctx,
                                           String stageName,
                                           Collection<T> evts)

Selects a node for given events that should be processed by a stage with given name.

Specified by:
  `route` in interface `StreamerEventRouter`
Parameters:
  `ctx` - Streamer context.
  `stageName` - Stage name to route events.
  `evts` - Events.
Returns:
  Events to node mapping. If this method returns `null` then the whole pipeline execution will be terminated. All running and ongoing stages for pipeline execution will be cancelled.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC3
Release Date | : March 24 2015