Package org.apache.sysds.runtime.controlprogram.federated

## Class FederatedWorkerHandler

- java.lang.Object
- - io.netty.channel.ChannelHandlerAdapter
  - - io.netty.channel.ChannelInboundHandlerAdapter
    - - org.apache.sysds.runtime.controlprogram.federated.FederatedWorkerHandler

- All Implemented Interfaces:
    `io.netty.channel.ChannelHandler`, `io.netty.channel.ChannelInboundHandler`

      public class FederatedWorkerHandler
      extends io.netty.channel.ChannelInboundHandlerAdapter

  Note: federated worker handler created for every command; and concurrent parfor threads at coordinator need separate execution contexts at the federated sites too

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

      `io.netty.channel.ChannelHandler.Sharable`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FederatedWorkerHandler​(FederatedLookupTable flt, FederatedReadCache frc, FederatedWorkloadAnalyzer fan)` | Create a Federated Worker Handler.
    `FederatedWorkerHandler​(FederatedLookupTable flt, FederatedReadCache frc, FederatedWorkloadAnalyzer fan, Timing timing)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `channelRead​(io.netty.channel.ChannelHandlerContext ctx, Object msg)` |
    `void` | `exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)` |

    - ### Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

      `channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered`

    - ### Methods inherited from class io.netty.channel.ChannelHandlerAdapter

      `handlerAdded, handlerRemoved, isSharable`

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

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

    - ### Methods inherited from interface io.netty.channel.ChannelHandler

      `handlerAdded, handlerRemoved`

- - ### Constructor Detail

    - #### FederatedWorkerHandler

          public FederatedWorkerHandler​(FederatedLookupTable flt,
                                        FederatedReadCache frc,
                                        FederatedWorkloadAnalyzer fan)

      Create a Federated Worker Handler. Note: federated worker handler created for every command; and concurrent parfor threads at coordinator need separate execution contexts at the federated sites too
      Parameters:
        `flt` - The Federated Lookup Table of the current Federated Worker.
        `frc` - Read cache shared by all worker handlers.
        `fan` - A Workload analyzer object (should be null if not used).

    - #### FederatedWorkerHandler

          public FederatedWorkerHandler​(FederatedLookupTable flt,
                                        FederatedReadCache frc,
                                        FederatedWorkloadAnalyzer fan,
                                        Timing timing)

  - ### Method Detail

    - #### channelRead

          public void channelRead​(io.netty.channel.ChannelHandlerContext ctx,
                                  Object msg)

      Specified by:
        `channelRead` in interface `io.netty.channel.ChannelInboundHandler`
      Overrides:
        `channelRead` in class `io.netty.channel.ChannelInboundHandlerAdapter`

    - #### exceptionCaught

          public void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx,
                                      Throwable cause)

      Specified by:
        `exceptionCaught` in interface `io.netty.channel.ChannelHandler`
      Specified by:
        `exceptionCaught` in interface `io.netty.channel.ChannelInboundHandler`
      Overrides:
        `exceptionCaught` in class `io.netty.channel.ChannelInboundHandlerAdapter`