/** * For internal use only. * @hidden */ @Override public MasterStateException wrapSelf(String msg) { return new MasterStateException(msg, this); } }
final InetSocketAddress masterAddress = getMasterSocket(); if (masterAddress.equals(node.getSocketAddress())) { throw new MasterStateException(masterErrorMessage);
/** * Invoked when this node transitions to the master state. Aborts all * inflight replay transactions outstanding from a previous state as a * Replica, because they were initiated by a different master and will * never complete. Also, release any Replica transactions that were waiting * on consistency policy requirements. */ void masterTransitionCleanup() throws DatabaseException { final MasterTransfer activeTransfer = repNode.getActiveTransfer(); if (activeTransfer != null) { final String msg = "Master state transition while there is an ongoing master " + "transfer initiated at:" + new TracerFormatter().getDate(activeTransfer.getStartTime()); throw EnvironmentFailureException.unexpectedState(repImpl, msg); } hardRecoveryElectionException = null; replay.abortOldTxns(); consistencyTracker.forceTripLatches (new MasterStateException(repNode.getRepImpl(). getStateChangeEvent())); }
throw new MasterStateException(getRepImpl(). getStateChangeEvent());
return new MemberNotFoundException(fail.getMessage()); case IS_MASTER: return new MasterStateException(fail.getMessage()); case IS_REPLICA: return new ReplicaStateException(fail.getMessage());