Author: stefanegli
Date: Mon Apr 25 09:13:27 2016
New Revision: 1740778
URL: http://svn.apache.org/viewvc?rev=1740778&view=rev
Log:
SLING-5683 : moved misleading 'duplicate sling.id' comment of DiscoveryService
down to more appropriate ClusterView and TopologyView, changing it to state
that each instance must have a unique sling.id - as that is indeed what
discovery API wants to ensure/guarantee. Also, added a comment about the fact
that no topology assumptions whatsoever can be done between TOPOLOGY_CHANGING
and TOPOLOGY_CHANGED. Both aren't meant to change the API really but are rather
clarifications to better reflect the original intentions
Modified:
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/ClusterView.java
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/DiscoveryService.java
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/TopologyEvent.java
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/TopologyView.java
Modified:
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/ClusterView.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/ClusterView.java?rev=1740778&r1=1740777&r2=1740778&view=diff
==============================================================================
---
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/ClusterView.java
(original)
+++
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/ClusterView.java
Mon Apr 25 09:13:27 2016
@@ -30,6 +30,9 @@ import aQute.bnd.annotation.ProviderType
* persistence layer/jcr repository.
* <p>
* A ClusterView can also consist of just one single instance.
+ * <p>
+ * All instances in a cluster must and do have a unique sling.id.
+ * @see InstanceDescription#getSlingId()
*/
@ProviderType
public interface ClusterView {
Modified:
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/DiscoveryService.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/DiscoveryService.java?rev=1740778&r1=1740777&r2=1740778&view=diff
==============================================================================
---
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/DiscoveryService.java
(original)
+++
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/DiscoveryService.java
Mon Apr 25 09:13:27 2016
@@ -26,9 +26,6 @@ import aQute.bnd.annotation.ProviderType
* The discovery service is in charge of managing live instances that
* have announced themselves as being part of a topology view. The exact
* details of how this announcement occurs is implementation dependent.
- * <p>
- * Note that the discovery service fails if it detects a situation
- * where more than one instance with the same sling.id exists in a cluster.
*/
@ProviderType
public interface DiscoveryService {
Modified:
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/TopologyEvent.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/TopologyEvent.java?rev=1740778&r1=1740777&r2=1740778&view=diff
==============================================================================
---
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/TopologyEvent.java
(original)
+++
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/TopologyEvent.java
Mon Apr 25 09:13:27 2016
@@ -42,6 +42,11 @@ public class TopologyEvent {
* being discovered. Once the discovery is finished, a TOPOLOGY_CHANGED
* is sent with the new topology view.
* <p>
+ * After receiving a TOPOLOGY_CHANGING and before receiving a
+ * TOPOLOGY_CHANGED event a TopologyEventListener cannot make any
+ * assumptions wrt the topology whatsoever, including whether or not
+ * the local instance is part of it at all (partitioning).
+ * <p>
* An implementation must always send a TOPOLOGY_CHANGING before a
* TOPOLOGY_CHANGED.
*/
Modified:
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/TopologyView.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/TopologyView.java?rev=1740778&r1=1740777&r2=1740778&view=diff
==============================================================================
---
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/TopologyView.java
(original)
+++
sling/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/TopologyView.java
Mon Apr 25 09:13:27 2016
@@ -25,7 +25,9 @@ import aQute.bnd.annotation.ProviderType
/**
* A topology view is a cross-cluster list of instances and clusters
* that have announced themselves with the DiscoveryService.
- *
+ * <p>
+ * All instances in a topology must and do have a unique sling.id.
+ * @see InstanceDescription#getSlingId()
*/
@ProviderType
public interface TopologyView {