Package org.apache.helix.ipc

Examples of org.apache.helix.ipc.HelixIPCCallback


        HelixMessageScope scope =
            new HelixMessageScope.Builder().cluster(clusterName).resource(resourceName)
                .partition(partitionName).state(state).sourceInstance(srcInstance).build();

        // Get callback
        HelixIPCCallback callback = callbacks.get(messageType);
        if (callback == null) {
          throw new IllegalStateException("No callback registered for message type " + messageType);
        }

        // Handle callback
        callback.onMessage(scope, messageId, byteBuf);

        // Stats
        statRxMsg.mark();
        statRxBytes.mark(messageLength);
      } finally {
View Full Code Here


          new NettyHelixIPCService(new NettyHelixIPCService.Config()
              .setInstanceName(localhost + "_" + port).setPort(port)
              .setNumConnections(numConnections));

      // Counts number of messages received, and ack them
      ipcService.registerCallback(MESSAGE_TYPE, new HelixIPCCallback() {
        @Override
        public void onMessage(HelixMessageScope scope, UUID messageId, ByteBuf message) {
          // Do nothing
        }
      });
View Full Code Here

TOP

Related Classes of org.apache.helix.ipc.HelixIPCCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.