code: private void queueNotifications(long clientId, NamespaceEvent event, long txId)
        throws TransactionIdTooOldException, InvalidClientIdException {
      if (txId == -1) {
        return;
      }
      
      if (LOG.isDebugEnabled()) {
        LOG.debug("Queueing notifications for client " + clientId + " from txId " +
            txId + " at [" + event.path + ", " +
            EventType.fromByteValue(event.type) + "] ...");
      }
      
      ClientData clientData = clientsData.get(clientId);
      if (clientData == null) {
        LOG.error("Missing the client data for client id: " + clientId);
        throw new InvalidClientIdException("Missing the client data");
      }
      
      // Store the notifications in the queue for this client
      serverHistory.addNotificationsToQueue(event, txId, clientData.queue);
    }
docs: Queues the notification for a client. The queued notifications will be sent
  asynchronously after this method returns to the specified client.
  
  The queued notifications will be notifications for the given event and
  their associated transaction id is greater then the given transaction
  id (exclusive).
  
  @param clientId the client to which the notifications should be sent
  @param event the subscribed event
  @param txId the transaction id from which we should send the
  notifications (exclusive). If this is -1, then
  nothing will be queued for this client.
  @throws TransactionIdTooOldException when the history has no records for
  the given transaction id.
  @throws InvalidClientIdException when the client isn't registered