Пример #1
0
  private void deliverPendingView() {
    try {
      pendingView.go();
    } catch (AppiaEventException e) {
      e.printStackTrace();
    }

    if (!pendingMessages.isEmpty()) {
      log.debug("Delivering " + pendingMessages.size() + " pending messages");
      for (GroupSendableEvent event : pendingMessages) {
        reliableDATADeliver(event);
      }
      pendingMessages.clear();
    }

    if (!utSet) {
      try {
        UniformTimer ut =
            new UniformTimer(
                UNIFORM_INFO_PERIOD,
                pendingView.getChannel(),
                Direction.DOWN,
                this,
                EventQualifier.ON);
        ut.go();
        utSet = true;
      } catch (AppiaEventException e) {
        e.printStackTrace();
      } catch (AppiaException e) {
        e.printStackTrace();
      }
    }

    pendingView = null;
  }
Пример #2
0
 private void handleUniformTimer(UniformTimer timer) {
   // log.debug("Uniform timer expired. Now is: "+timeProvider.currentTimeMillis());
   if (!isBlocked
       && newUniformInfo
       && timeProvider.currentTimeMillis() - timeLastMsgSent >= UNIFORM_INFO_PERIOD) {
     // log.debug("Last message sent was at time "+timeLastMsgSent+". Will send Uniform info!");
     sendUniformInfo(timer.getChannel());
     newUniformInfo = false;
   }
 }