use of org.apache.geode.distributed.internal.locks.LockGrantorDestroyedException in project geode by apache.
the class TXLockUpdateParticipantsMessage method updateParticipants.
/**
* Update the Grantor with a new set of Participants. This method is meant to be used in a local
* context (does <b>NOT</b> involve any messaging)
*/
public static void updateParticipants(DLockService svc, TXLockId txLockId, Set updatedParticipants) {
DLockGrantor grantor = null;
try {
grantor = DLockGrantor.waitForGrantor(svc);
if (grantor != null) {
try {
TXLockBatch txb = (TXLockBatch) grantor.getLockBatch(txLockId);
if (txb == null) {
// fixes bug 42656
return;
}
txb.setParticipants(updatedParticipants);
grantor.updateLockBatch(txLockId, txb);
} catch (LockGrantorDestroyedException ignoreit) {
}
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
Aggregations