An announcement is the information exchanged by the topology connector and
contains all clusters and instances which both the topology connector client
and servlet see (in their part before joining the two worlds).
The announcement registry keeps track of all the announcement that this
instance either received by a joined topology connector or that a topology
connector inherited from the counterpart (the topology connector servlet)
With SLING-3389 the Announcement itself doesn't use the created
(ie timeout) field anymore (it still has it currently for backwards
compatibility on the wire-level) - hence that's why there's this
small in-memory wrapper object which contains an Announcement and
carries a lastHeartbeat property.
Compare this Announcement with another one, ignoring the 'created'
property - which gets added to the JSON object automatically due
to SLING-3389 wire-backwards-compatibility - and backoffInterval
introduced as part of SLING-3382
This implementation of the cross-cluster service uses the view manager
implementation for detecting changes in a cluster and only supports one
cluster (of which this instance is part of).
Returns a comma separated list of hostnames and/or ip addresses which are allowed as
remote hosts to open connections to the topology connector servlet
getViewId() -
Method in class org.apache.sling.discovery.impl.common.View
Handle osgi events from the repository and take note when
the established view, properties or announcements change - and
inform the DiscoveryServiceImpl in those cases.
The heartbeat handler is responsible and capable of issuing both local and
remote heartbeats and registers a periodic job with the scheduler for doing so.
The initialize method is called by the DiscoveryServiceImpl.activate
as we require the discoveryService (and the discoveryService has
a reference on us - but we cant have circular references in osgi).
InstanceDescription which is used at bootstrap time when there is no
established view yet - hence the instance is considered to be in 'isolated'
state.
Name of the repository descriptor to be taken into account for leader election:
those instances have preference to become leader which have the corresponding descriptor value of 'false'
Register the given announcement - and returns the backoff interval (in seconds)
for stable connectors
- or -1 if the registration was not successful (likely indicating a loop)
Servlet which receives topology announcements at
/libs/sling/topology/connector*
without authorization (authorization is handled either via
hmac-signature with a shared key or via a flexible whitelist)