Examples of Heartbeat


Examples of com.dianping.cat.message.Heartbeat

  }

  @Test
  public void testHeartbeat() {
    long timestamp = 1325489621987L;
    Heartbeat heartbeat = newHeartbeat("type", "name", timestamp, "0", "here is the data.");

    check(heartbeat, "H2012-01-02 15:33:41.987\ttype\tname\t0\there is the data.\t\n");
  }
View Full Code Here

Examples of com.dianping.cat.message.Heartbeat

    event.complete();
  }

  @Override
  public void logHeartbeat(String type, String name, String status, String nameValuePairs) {
    Heartbeat heartbeat = newHeartbeat(type, name);

    heartbeat.addData(nameValuePairs);
    heartbeat.setStatus(status);
    heartbeat.complete();
  }
View Full Code Here

Examples of com.dianping.cat.message.Heartbeat

    while (m_active) {
      long start = MilliSecondTimer.currentTimeMillis();

      if (m_manager.isCatEnabled()) {
        Transaction t = cat.newTransaction("System", "Status");
        Heartbeat h = cat.newHeartbeat("Heartbeat", m_ipAddress);
        StatusInfo status = new StatusInfo();

        t.addData("dumpLocked", m_manager.isDumpLocked());
        try {
          StatusInfoCollector statusInfoCollector = new StatusInfoCollector(m_statistics, m_jars);

          status.accept(statusInfoCollector.setDumpLocked(m_manager.isDumpLocked()));

          buildExtensionData(status);
          h.addData(status.toString());
          h.setStatus(Message.SUCCESS);
        } catch (Throwable e) {
          h.setStatus(e);
          cat.logError(e);
        } finally {
          h.complete();
        }
        t.setStatus(Message.SUCCESS);
        t.complete();
      }
      long elapsed = MilliSecondTimer.currentTimeMillis() - start;
View Full Code Here

Examples of com.dianping.cat.message.Heartbeat

  }

  @Test
  public void testHeartbeat() throws Exception {
    long timestamp = 1325489621987L;
    Heartbeat heartbeat = newHeartbeat("type", "name", timestamp, "0", "here is the data.");

    MessageTree tree = new DefaultMessageTree();
    tree.setMessage(heartbeat);
    check(tree, heartbeat,
          "<tr><td>H15:33:41.987</td><td>type</td><td>name</td><td>&nbsp;</td><td>here is the data.</td></tr>\r\n");
View Full Code Here

Examples of com.opengamma.livedata.msg.Heartbeat

  // LiveDataHeartbeat

  @Override
  public Collection<LiveDataSpecification> heartbeat(final Collection<LiveDataSpecification> activeSubscriptions) {
    Heartbeat heartbeat = new Heartbeat(activeSubscriptions);
    FudgeMsg heartbeatMsg = heartbeat.toFudgeMsg(new FudgeSerializer(getMessageSender().getFudgeContext()));
    getMessageSender().send(heartbeatMsg);
    return null;
  }
View Full Code Here

Examples of com.sirenian.hellbound.domain.glyph.Heartbeat

       
    verifyMocks();
  }
 
  public void shouldCreateANewGlyphWithListenersToItWhenGameIsStarted() throws Exception {
    Heartbeat heartbeat = new StubHeartbeat();
   
    Mock glyphFactoryMock = mock(GlyphFactory.class);
    Mock glyphListener = mock(GlyphListener.class);
   
    glyphFactoryMock.expects("nextGlyph")
View Full Code Here

Examples of com.subhajit.processmanager.agent.heartbeat.Heartbeat

        public void run() {
          try {
            final IHeartbeatRepository repository = (IHeartbeatRepository) Class
                .forName(heartbeatRepositoryClassName)
                .getConstructor(String.class).newInstance(uid);
            final IHeartbeat heartbeat = new Heartbeat(System
                .currentTimeMillis(), uid, jmxUrl0);
            while (true) {
              repository.update(heartbeat);
              Thread.sleep(IHeartbeat.INTERVAL);
            }
View Full Code Here

Examples of com.wordnik.swaggersocket.protocol.Heartbeat

    protected final Object wrapMessage(AtmosphereResponse res, String message) {

        if (message != null && message.startsWith("heartbeat-")) {
            String identity = (String) getContextValue(res.request(), IDENTITY);
            return new Heartbeat(String.valueOf(System.nanoTime()), identity);
        } else {
            Request swaggerSocketRequest = lookupRequest(res.request());
            Response.Builder builder = new Response.Builder();

            builder.body(message)
View Full Code Here

Examples of example.chat.msgtask.HearTbeat

      break;
    case ChatCommandId.C_ADDFRIEND_REQ:
      new AddFriend(session,inMsg).run();
      break;
    case ChatCommandId.C_HEARTBEAT_REQ:
      new HearTbeat(session,inMsg).run();
      break;
    case ChatCommandId.C_SEND_MSG:
      new SendMessage(session,inMsg).run();
      break;
    }
View Full Code Here

Examples of org.apache.ambari.server.agent.HeartBeat

    ExecutionCommand execCmd = new ExecutionCommand();
    execCmd.setCommandId("2-34");
    execCmd.setHostname(DummyHostname1);
    aq.enqueue(DummyHostname1, new ExecutionCommand());
    HeartBeat hb = new HeartBeat();
    hb.setResponseId(0);
    hb.setNodeStatus(new HostStatus(Status.HEALTHY, DummyHostStatus));
    hb.setHostname(DummyHostname1);

    handler.handleHeartBeat(hb);
    assertEquals(HostState.HEALTHY, hostObject.getState());
    assertEquals(0, aq.dequeueAll(DummyHostname1).size());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.