Search in sources :

Example 1 with LocalizedMessage

use of org.apache.geode.internal.logging.log4j.LocalizedMessage in project geode by apache.

the class GrantorRequestProcessor method elderSyncWait.

/**
   * elderSyncWait
   * 
   * @param newElder
   * @param dls
   */
private static void elderSyncWait(InternalDistributedSystem sys, InternalDistributedMember newElder, DLockService dls) {
    GrantorRequestContext grc = sys.getGrantorRequestContext();
    grc.waitingToChangeElder = true;
    final LocalizedMessage message = LocalizedMessage.create(LocalizedStrings.GrantorRequestProcessor_GRANTORREQUESTPROCESSOR_ELDERSYNCWAIT_THE_CURRENT_ELDER_0_IS_WAITING_FOR_THE_NEW_ELDER_1, new Object[] { grc.currentElder, newElder });
    while (grc.waitingToChangeElder) {
        logger.info(LogMarker.DLS, message);
        boolean interrupted = Thread.interrupted();
        try {
            grc.elderLockCondition.await(sys.getConfig().getMemberTimeout());
        } catch (InterruptedException ignore) {
            interrupted = true;
            sys.getCancelCriterion().checkCancelInProgress(ignore);
        } finally {
            if (interrupted)
                Thread.currentThread().interrupt();
        }
    }
}
Also used : LocalizedMessage(org.apache.geode.internal.logging.log4j.LocalizedMessage)

Aggregations

LocalizedMessage (org.apache.geode.internal.logging.log4j.LocalizedMessage)1