From: <tho...@us...> - 2013-11-01 13:34:18
|
Revision: 7506 http://bigdata.svn.sourceforge.net/bigdata/?rev=7506&view=rev Author: thompsonbry Date: 2013-11-01 13:34:10 +0000 (Fri, 01 Nov 2013) Log Message: ----------- javadoc related to QuorumServer.getService(UUID) as implemented by HAQuorumService. Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/journal/AbstractJournal.java branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournalServer.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/journal/AbstractJournal.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/journal/AbstractJournal.java 2013-10-31 17:04:33 UTC (rev 7505) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/journal/AbstractJournal.java 2013-11-01 13:34:10 UTC (rev 7506) @@ -8001,15 +8001,17 @@ final UUID leaderId = req.getLeaderId(); + // Note: Will throw exception if our HAQuorumService is not running. final HAGlue leader = getQuorum().getClient().getService(leaderId); if (leader == null) throw new RuntimeException( "Could not discover the quorum leader."); + // Get our serviceId. final UUID serviceId = getServiceId(); - if(serviceId == null) + if (serviceId == null) throw new AssertionError(); final Callable<IHANotifyReleaseTimeResponse> task = ((AbstractHATransactionService) AbstractJournal.this Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournalServer.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournalServer.java 2013-10-31 17:04:33 UTC (rev 7505) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournalServer.java 2013-11-01 13:34:10 UTC (rev 7506) @@ -1689,11 +1689,29 @@ } /** - * Resolve an {@link HAGlue} object from its Service UUID. + * {@inheritDoc} + * <p> + * This implementation resolves an {@link HAGlue} object from its + * Service UUID using the <strong>pre-existing</strong> connection for + * the {@link HAClient} and the cached service discovery lookup for that + * connection. If the {@link HAClient} is not connected, then an + * {@link IllegalStateException} will be thrown. + * + * @param serviceId + * The {@link UUID} of the service to be resolved. + * + * @return The proxy for the service having the specified {@link UUID} + * and never <code>null</code>. + * + * @throws IllegalStateException + * if the {@link HAClient} is not connected. + * @throws QuorumException + * if no service can be discovered for that {@link UUID}. */ @Override public S getService(final UUID serviceId) { + // Throws IllegalStateException if not connected (HAClient). final HAGlueServicesClient discoveryClient = server .getHAClient().getConnection().getHAGlueServicesClient(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |