src/java/org/apache/cassandra/db/transaction/BatchMutateTransactionCoordinator.java
/** Delivers the notifications to a coordinator if it exists, and otherwise queues it up for later delivery
     *
     * @param transactionId
     * @param notificationCount
     */
Delivers the notifications to a coordinator if it exists, and otherwise queues it up for later delivery
@param transactionId
@param notificationCount
Delivers the notifications to a coordinator if it exists and otherwise queues it up for later delivery @param transactionId @param notificationCount
public static void deliverNotification(Long transactionId, int notificationCount)
    {
        if (static_logger.isTraceEnabled()) {
            static_logger.trace("deliverNotification({}, {})", new Object[]{transactionId, notificationCount});
        }
        BatchMutateTransactionCoordinator coordinator = null;
        synchronized(queuedNotifications) {
            coordinator = findCoordinator(transactionId);
            if (coordinator == null) {
                Integer previousCount = queuedNotifications.get(transactionId);
                if (previousCount != null) {
                    queuedNotifications.put(transactionId, previousCount + notificationCount);
                } else {
                    queuedNotifications.put(transactionId, notificationCount);
                }
            }
        }
        if (coordinator != null) {
            coordinator.receiveNotify(notificationCount);
        }
    }
public static void deliverNotification ( Long transactionId , int notificationCount ) { if ( static_logger . isTraceEnabled ( ) ) { static_logger . trace ( "deliverNotification({}, {})" , new Object [ ] { transactionId , notificationCount } ) ; } BatchMutateTransactionCoordinator coordinator = null ; synchronized ( queuedNotifications ) { coordinator = findCoordinator ( transactionId ) ; if ( coordinator == null ) { Integer previousCount = queuedNotifications . get ( transactionId ) ; if ( previousCount != null ) { queuedNotifications . put ( transactionId , previousCount + notificationCount ) ; } else { queuedNotifications . put ( transactionId , notificationCount ) ; } } } if ( coordinator != null ) { coordinator . receiveNotify ( notificationCount ) ; } }
Delivers the notifications to a coordinator if it exists, and otherwise queues it up for later delivery
 @param transactionId
 @param notificationCount
Delivers the notifications to a coordinator if it exists and otherwise queues it up for later delivery @param transactionId @param notificationCount
// Notification delivery & coordinator finding are synchronized together to avoid a race between: //  findCoordinator then queue notification and //  create coordinator then get past where we check for queued notifications // If a coordinator is created after we have the lock, it must // wait for us to release the lock before it can check for // queued notifications and is therefor guarenteed to see them // Send the notify outside the synchronized block so other // notifications can be delivered to other coordinators