protected void checkCancellationInPostWait(DM mgr) { // Make sure that a cancellation check occurs. // TODO there may be a more elegant place to put this... mgr.getCancelCriterion().checkCancelInProgress(null); }
@Override public String cancelInProgress() { if (dm == null) { return "No dm"; } return dm.getCancelCriterion().cancelInProgress(); }
public boolean isDisconnecting() { if (this.dm == null) { return true; } if (this.dm.getCancelCriterion().cancelInProgress() != null) { return true; } if (!this.isConnected) { return true; } return this.isDisconnecting; }
@Override public boolean isConnected() { if (this.dm == null) { return false; } if (this.dm.getCancelCriterion().cancelInProgress() != null) { return false; } if (this.isDisconnecting) { return false; } return this.isConnected; }
public boolean isDisconnecting() { if (this.dm == null) { return true; } if (this.dm.getCancelCriterion().cancelInProgress() != null) { return true; } if (!this.isConnected) { return true; } return this.isDisconnecting; }
@Override public boolean isConnected() { if (this.dm == null) { return false; } if (this.dm.getCancelCriterion().cancelInProgress() != null) { return false; } if (this.isDisconnecting) { return false; } return this.isConnected; }
private void checkCancellation() { dm.getCancelCriterion().checkCancelInProgress(null); }
private void checkCancellation() { dm.getCancelCriterion().checkCancelInProgress(null); }
protected void checkCancellation() { DM dm = this.getDistributionManager(); // TODO does dm == null mean we're dead? if (dm != null) { dm.getCancelCriterion().checkCancelInProgress(null); } } /**
@Override public RuntimeException generateCancelledException(Throwable e) { if (dm == null) { return new DistributedSystemDisconnectedException("no dm", e); } return dm.getCancelCriterion().generateCancelledException(e); } }
@Override public RuntimeException generateCancelledException(Throwable e) { if (dm == null) { return new DistributedSystemDisconnectedException("no dm", e); } return dm.getCancelCriterion().generateCancelledException(e); } }
public String forceStop() { if (this.dm == null) { return LocalizedStrings.InternalDistributedSystem_NO_DISTRIBUTION_MANAGER.toLocalizedString(); } String reason = dm.getCancelCriterion().cancelInProgress(); return reason; }
protected void checkCancellation() { DM dm = this.getDistributionManager(); // TODO does dm == null mean we're dead? if (dm != null) { dm.getCancelCriterion().checkCancelInProgress(null); } } /**
public String forceStop() { if (this.dm == null) { return LocalizedStrings.InternalDistributedSystem_NO_DISTRIBUTION_MANAGER.toLocalizedString(); } String reason = dm.getCancelCriterion().cancelInProgress(); return reason; }
@Override public String cancelInProgress() { checkFailure(); if (dm == null) { return "No dm"; } return dm.getCancelCriterion().cancelInProgress(); }
public GfxdWaitingReplyProcessor(DM dm, Set<DistributedMember> members, boolean ignoreNodeDown, boolean useLatchForWaiters) { super(dm, members, true); this.grantedMembers = new THashSet(); this.ignoreNodeDown = ignoreNodeDown; this.waitLatch = useLatchForWaiters ? new StoppableCountDownLatch( getDistributionManager().getCancelCriterion(), 1) : null; }
public GfxdWaitingReplyProcessor(DM dm, Set<DistributedMember> members, boolean ignoreNodeDown, boolean useLatchForWaiters) { super(dm, members, true); this.grantedMembers = new THashSet(); this.ignoreNodeDown = ignoreNodeDown; this.waitLatch = useLatchForWaiters ? new StoppableCountDownLatch( getDistributionManager().getCancelCriterion(), 1) : null; }
public GfxdWaitingReplyProcessor(DM dm, Set<DistributedMember> members, boolean ignoreNodeDown, boolean useLatchForWaiters) { super(dm, members, true); this.grantedMembers = new THashSet(); this.ignoreNodeDown = ignoreNodeDown; this.waitLatch = useLatchForWaiters ? new StoppableCountDownLatch( getDistributionManager().getCancelCriterion(), 1) : null; }
protected void postWait() { waiting = false; removeListener(); final DM mgr = getDistributionManager(); mgr.getStats().endReplyWait(this.statStart, this.initTime); // Make sure that a cancellation check occurs. // TODO there may be a more elegant place to put this... mgr.getCancelCriterion().checkCancelInProgress(null); }
public GfxdFunctionReplyMessageProcessor(DM dm, Set<DistributedMember> members, GfxdFunctionMessage<T> msg) { super(dm, members, false); this.userCollector = msg.userCollector; this.recordStats = msg.timeStatsEnabled; this.replyReceivedMsgs = msg.replyReceivedMsgs; this.allowExecutionOnAdminMembers = msg.allowExecutionOnAdminMembers(); this.isDirectReplyMessage = (msg instanceof DirectReplyMessage && ((DirectReplyMessage)msg).supportsDirectAck()); if (msg.requiresSync()) { this.latch = new StoppableCountDownLatch(dm.getCancelCriterion(), 1); } else { this.latch = null; } this.helper = new GfxdResultCollectorHelper(); }