Package org.apache.helix.api.id

Examples of org.apache.helix.api.id.MessageId


    List<Message> resetMessages = new ArrayList<Message>();
    List<PropertyKey> messageKeys = new ArrayList<PropertyKey>();
    for (String partitionName : resetPartitionNames) {
      // send ERROR to initialState message
      MessageId msgId = MessageId.from(UUID.randomUUID().toString());
      Message message = new Message(MessageType.STATE_TRANSITION, msgId);
      message.setSrcName(adminName);
      message.setTgtName(instanceName);
      message.setMsgState(MessageState.NEW);
      message.setPartitionId(PartitionId.from(partitionName));
View Full Code Here


    TestMessagingHandlerFactory factory = new TestMessagingHandlerFactory();
    _participants[1].getMessagingService().registerMessageHandlerFactory(factory.getMessageType(),
        factory);

    MessageId msgId = MessageId.from(new UUID(123, 456).toString());
    Message msg = new Message(factory.getMessageType(), msgId);
    msg.setMessageId(msgId);
    msg.setSrcName(hostSrc);
    msg.setTgtSessionId(SessionId.from("*"));
    msg.setMsgState(MessageState.NEW);
View Full Code Here

        factory);

    _participants[0].getMessagingService().registerMessageHandlerFactory(factory.getMessageType(),
        factory);

    MessageId msgId = MessageId.from(new UUID(123, 456).toString());
    Message msg = new Message(factory.getMessageType(), msgId);
    msg.setMessageId(msgId);
    msg.setSrcName(hostSrc);

    msg.setTgtSessionId(SessionId.from("*"));
 
View Full Code Here

    TestMessagingHandlerFactory factory = new TestMessagingHandlerFactory();
    _participants[1].getMessagingService().registerMessageHandlerFactory(factory.getMessageType(),
        factory);

    MessageId msgId = MessageId.from(new UUID(123, 456).toString());
    Message msg = new Message(factory.getMessageType(), msgId);
    msg.setMessageId(msgId);
    msg.setSrcName(hostSrc);

    msg.setTgtSessionId(SessionId.from("*"));
 
View Full Code Here

      TestMessagingHandlerFactory factory = new TestMessagingHandlerFactory();
      _participants[0].getMessagingService().registerMessageHandlerFactory(
          factory.getMessageType(), factory);

    }
    MessageId msgId = MessageId.from(new UUID(123, 456).toString());
    Message msg = new Message(new TestMessagingHandlerFactory().getMessageType(), msgId);
    msg.setMessageId(msgId);
    msg.setSrcName(hostSrc);

    msg.setTgtSessionId(SessionId.from("*"));
 
View Full Code Here

      TestMessagingHandlerFactory factory = new TestMessagingHandlerFactory();
      _participants[i].getMessagingService().registerMessageHandlerFactory(
          factory.getMessageType(), factory);

    }
    MessageId msgId = MessageId.from(new UUID(123, 456).toString());
    Message msg = new Message(new TestMessagingHandlerFactory().getMessageType(), msgId);
    msg.setMessageId(msgId);
    msg.setSrcName(hostSrc);

    msg.setTgtSessionId(SessionId.from("*"));
 
View Full Code Here

      TestMessagingHandlerFactory factory = new TestMessagingHandlerFactory();
      _participants[i].getMessagingService().registerMessageHandlerFactory(
          factory.getMessageType(), factory);

    }
    MessageId msgId = MessageId.from(new UUID(123, 456).toString());
    Message msg = new Message(MessageType.CONTROLLER_MSG, msgId);
    msg.setMessageId(msgId);
    msg.setSrcName(hostSrc);

    msg.setTgtSessionId(SessionId.from("*"));
 
View Full Code Here

            sessionIdMap.put(liveInstance.getInstanceName(), liveInstance.getTypedSessionId()
                .stringify());
          }
        }
        for (Map<String, String> map : matchedList) {
          MessageId id = MessageId.from(UUID.randomUUID().toString());
          Message newMessage = new Message(message.getRecord(), id);
          String srcInstanceName = _manager.getInstanceName();
          String tgtInstanceName = map.get("instanceName");
          // Don't send message to self
          if (recipientCriteria.isSelfExcluded()
View Full Code Here

    return messagesToSendMap;
  }

  private List<Message> generateMessagesForController(Message message) {
    List<Message> messages = new ArrayList<Message>();
    MessageId id = MessageId.from(UUID.randomUUID().toString());
    Message newMessage = new Message(message.getRecord(), id);
    newMessage.setMessageId(id);
    newMessage.setSrcName(_manager.getInstanceName());
    newMessage.setTgtName("Controller");
    messages.add(newMessage);
View Full Code Here

public class TestHelixTaskExecutor {

  @Test()
  public void testCMTaskExecutor() throws Exception {
    System.out.println("START TestCMTaskExecutor");
    MessageId msgId = MessageId.from("TestMessageId");
    Message message = new Message(MessageType.TASK_REPLY, msgId);

    message.setMessageId(msgId);
    message.setSrcName("cm-instance-0");
    message.setTgtName("cm-instance-1");
View Full Code Here

TOP

Related Classes of org.apache.helix.api.id.MessageId

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.