Examples of heartBeat()


Examples of org.apache.hadoop.yarn.server.nodemanager.api.LocalizationProtocol.heartbeat()

    LocalizationProtocol nmProxy = mock(LocalizationProtocol.class);
    LocalResource rsrcA = getMockRsrc(r, LocalResourceVisibility.PRIVATE);
    LocalResource rsrcB = getMockRsrc(r, LocalResourceVisibility.PRIVATE);
    LocalResource rsrcC = getMockRsrc(r, LocalResourceVisibility.APPLICATION);
    LocalResource rsrcD = getMockRsrc(r, LocalResourceVisibility.PRIVATE);
    when(nmProxy.heartbeat(isA(LocalizerStatus.class)))
      .thenReturn(new MockLocalizerHeartbeatResponse(LocalizerAction.LIVE,
            Collections.singletonList(rsrcA)))
      .thenReturn(new MockLocalizerHeartbeatResponse(LocalizerAction.LIVE,
            Collections.singletonList(rsrcB)))
      .thenReturn(new MockLocalizerHeartbeatResponse(LocalizerAction.LIVE,
View Full Code Here

Examples of org.apache.hadoop.yarn.server.nodemanager.api.LocalizationProtocol.heartbeat()

    LocalizationProtocol nmProxy = mock(LocalizationProtocol.class);
    LocalResource rsrcA = getMockRsrc(r, LocalResourceVisibility.PRIVATE);
    LocalResource rsrcB = getMockRsrc(r, LocalResourceVisibility.PRIVATE);
    LocalResource rsrcC = getMockRsrc(r, LocalResourceVisibility.APPLICATION);
    LocalResource rsrcD = getMockRsrc(r, LocalResourceVisibility.PRIVATE);
    when(nmProxy.heartbeat(isA(LocalizerStatus.class)))
      .thenReturn(new MockLocalizerHeartbeatResponse(LocalizerAction.LIVE,
            Collections.singletonList(rsrcA)))
      .thenReturn(new MockLocalizerHeartbeatResponse(LocalizerAction.LIVE,
            Collections.singletonList(rsrcB)))
      .thenReturn(new MockLocalizerHeartbeatResponse(LocalizerAction.LIVE,
View Full Code Here

Examples of org.jboss.errai.bus.server.MessageQueue.heartBeat()

                sendDisconnectWithReason(httpServletResponse.getOutputStream(),
                        "There is no queue associated with this session.");
                return;
            }

            queue.heartBeat();

            List<MarshalledMessage> messages = queue.poll(wait).getMessages();

            httpServletResponse.setHeader("Cache-Control", "no-cache");
            httpServletResponse.addHeader("Payload-Size", String.valueOf(messages.size()));
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

        sendDisconnectDueToSessionExpiry(httpServletResponse.getOutputStream());

        return;
      }

      queue.heartBeat();

      queue.poll(wait, httpServletResponse.getOutputStream());

      httpServletResponse.getOutputStream().close();
    }
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

            return;
          }
        }

        if ((queue = getQueue(session, false)) != null) {
          queue.heartBeat();
        }
        else {
          return;
        }
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

            return;
          }
        }

        if (event.getEventSubType() == CometEvent.EventSubType.TIMEOUT) {
          if (queue != null) queue.heartBeat();
        }
        else {
          if (queue != null) {
            queueToSession.remove(queue);
            service.getBus().closeQueue(session.getSessionId());
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

        break;


      case END:
        if ((queue = getQueue(session, false)) != null) {
          queue.heartBeat();
        }

        synchronized (activeEvents) {
          Set<HttpEvent> evt = activeEvents.get(session);
          if (evt != null) {
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

            evt.remove(event);
          }
        }

        if (event.getType() == HttpEvent.EventType.TIMEOUT) {
          if (queue != null) queue.heartBeat();
        }
        else {
          if (queue != null) {
            queueToSession.remove(queue);
            service.getBus().closeQueue(session.getSessionId());
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

      }
      sendDisconnectDueToSessionExpiry(response);
      return;
    }

    queue.heartBeat();

    final OutputStreamWriteAdapter writer;

    if (isSSERequest(request)) {
      final AsyncContext asyncContext = request.startAsync();
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

            try {
              queue.poll(writer);

              writer.write(SSE_TERMINATION_BYTES);

              queue.heartBeat();
              writer.flush();

              prepareSSEContinue(asynResponse);
            }
            catch (IOException e) {
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.