code: public NamespaceNotification getNamespaceNotification()
        throws IOException {
      FSEditLogOp op = null;
      NamespaceNotification notification = null;
      
      // Keep looping until we reach an operation that can be
      // considered a notification.
      while (true) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("edits.size=" + editsFile.length() + " editsNew.size=" +
              editsNewFile.length());
        }
        try {
          op = inputStream.readOp();
          if (LOG.isDebugEnabled()) {
            LOG.debug("inputStream.readOP() returned " + op);
          }
        } catch (IOException e) {
          LOG.warn("inputStream.readOp() failed", e);
          tryReloadingEditLog();
          return null;
        } catch (Exception e2) {
          LOG.error("Error reading log operation", e2);
          throw new IOException(e2);
        }
        
        // No operation to read at the moment from the transaction log
        if (op == null) {
          core.getMetrics().reachedEditLogEnd.inc();
          handleNullRead();
          trySwitchingEditLog();
          return null;
        } else {
          core.getMetrics().readOperations.inc();
          readNullAfterStreamFinished = false;
        }
        
        if (LOG.isDebugEnabled()) {
          LOG.debug("Read operation: " + op + " with txId=" +
              op.getTransactionId());
        }
        
        if (ServerLogReaderUtil.shouldSkipOp(expectedTransactionId, op)) {
          updateStreamPosition();
          continue;
        }
        expectedTransactionId = ServerLogReaderUtil.checkTransactionId(
            expectedTransactionId, op);
        updateStreamPosition();
        
        // Test if it can be considered a notification
        notification = ServerLogReaderUtil.createNotification(op);
        if (notification != null) {
          if (LOG.isDebugEnabled()) {
            LOG.debug("Emitting " + NotifierUtils.asString(notification));
          }
          core.getMetrics().readNotifications.inc();
          return notification;
        } 
      }
    }
docs: Reads from the edit log until it reaches an operation which can
  be considered a namespace notification (like FILE_ADDED, FILE_CLOSED
  or NODE_DELETED).
  
  @return the notification object or null if nothing is to be returned
  at the moment.
  @throws IOException raised when a fatal error occurred.