public class

NettyHelixIPCService

extends Object
implements HelixIPCService
java.lang.Object
   ↳ org.apache.helix.ipc.netty.NettyHelixIPCService

Class Overview

Provides partition/state-level messaging among nodes in a Helix cluster.

The message format is (where len == 4B, and contains the length of the next field)

      +----------------------+
      | totalLength (4B)     |
      +----------------------+
      | version (4B)         |
      +----------------------+
      | messageType (4B)     |
      +----------------------+
      | messageId (16B)      |
      +----------------------+
      | len | cluster        |
      +----------------------+
      | len | resource       |
      +----------------------+
      | len | partition      |
      +----------------------+
      | len | state          |
      +----------------------+
      | len | srcInstance    |
      +----------------------+
      | len | dstInstance    |
      +----------------------+
      | len | message        |
      +----------------------+
 

Summary

Nested Classes
class NettyHelixIPCService.Config  
[Expand]
Inherited Constants
From interface org.apache.helix.ipc.HelixIPCService
Public Constructors
NettyHelixIPCService(NettyHelixIPCService.Config config)
Public Methods
void registerCallback(int messageType, HelixIPCCallback callback)
Registers a callback for a given message type
void send(HelixAddress destination, int messageType, UUID messageId, ByteBuf message)
Sends a message to all partitions with a given state in the cluster.
void shutdown()
Shuts down event loops for message handling server and message passing client.
void start()
Starts message handling server, creates client bootstrap, and bootstraps partition routing table.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.helix.ipc.HelixIPCService

Public Constructors

public NettyHelixIPCService (NettyHelixIPCService.Config config)

Public Methods

public void registerCallback (int messageType, HelixIPCCallback callback)

Registers a callback for a given message type

public void send (HelixAddress destination, int messageType, UUID messageId, ByteBuf message)

Sends a message to all partitions with a given state in the cluster.

public void shutdown ()

Shuts down event loops for message handling server and message passing client.

Throws
Exception

public void start ()

Starts message handling server, creates client bootstrap, and bootstraps partition routing table.

Throws
Exception