Пример #1
0
  public void onTimeEvent(final long time, final DriverConductor conductor) {
    switch (status) {
      case INACTIVE:
        if (isDrained() || time > (timeOfLastStatusChange + imageLivenessTimeoutNs)) {
          status(PublicationImage.Status.LINGER);
          conductor.imageTransitionToLinger(this);
        }
        break;

      case LINGER:
        if (time > (timeOfLastStatusChange + imageLivenessTimeoutNs)) {
          reachedEndOfLife = true;
          conductor.cleanupImage(this);
        }
        break;
    }
  }