org.apache.sling.discovery.impl.topology.announcement
Class AnnouncementRegistryImpl

java.lang.Object
  extended by org.apache.sling.discovery.impl.topology.announcement.AnnouncementRegistryImpl
All Implemented Interfaces:
AnnouncementRegistry

@Service(value=AnnouncementRegistry.class)
public class AnnouncementRegistryImpl
extends Object
implements AnnouncementRegistry


Constructor Summary
AnnouncementRegistryImpl()
           
 
Method Summary
 void addAllExcept(Announcement target, org.apache.sling.discovery.ClusterView clusterView, AnnouncementFilter filter)
          Add all registered announcements to the given target announcement that are accepted by the given filter
 void checkExpiredAnnouncements()
          Check for expired announcements and remove any if applicable
 boolean hasActiveAnnouncement(String ownerId)
          Whether or not the given owner has an active (ie not expired) announcement registered
 Collection<Announcement> listAnnouncementsInSameCluster(org.apache.sling.discovery.ClusterView localClusterView)
          list all announcements that were received by instances in the local cluster
 Collection<org.apache.sling.discovery.InstanceDescription> listInstances(org.apache.sling.discovery.ClusterView localClusterView)
          Returns the list of instances contained in all non-expired announcements of this registry
 Collection<Announcement> listLocalAnnouncements()
          list all announcements that were received (incoming or inherited) by this instance
 Collection<CachedAnnouncement> listLocalIncomingAnnouncements()
          list all announcements that this instance received (incoming)
 long registerAnnouncement(Announcement topologyAnnouncement)
          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)
 void unregisterAnnouncement(String ownerId)
          Unregister the announcement owned by the given slingId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnouncementRegistryImpl

public AnnouncementRegistryImpl()
Method Detail

unregisterAnnouncement

public void unregisterAnnouncement(String ownerId)
Description copied from interface: AnnouncementRegistry
Unregister the announcement owned by the given slingId

Specified by:
unregisterAnnouncement in interface AnnouncementRegistry

listLocalAnnouncements

public Collection<Announcement> listLocalAnnouncements()
Description copied from interface: AnnouncementRegistry
list all announcements that were received (incoming or inherited) by this instance

Specified by:
listLocalAnnouncements in interface AnnouncementRegistry

listLocalIncomingAnnouncements

public Collection<CachedAnnouncement> listLocalIncomingAnnouncements()
Description copied from interface: AnnouncementRegistry
list all announcements that this instance received (incoming)

Specified by:
listLocalIncomingAnnouncements in interface AnnouncementRegistry

listAnnouncementsInSameCluster

public Collection<Announcement> listAnnouncementsInSameCluster(org.apache.sling.discovery.ClusterView localClusterView)
Description copied from interface: AnnouncementRegistry
list all announcements that were received by instances in the local cluster

Specified by:
listAnnouncementsInSameCluster in interface AnnouncementRegistry

hasActiveAnnouncement

public boolean hasActiveAnnouncement(String ownerId)
Description copied from interface: AnnouncementRegistry
Whether or not the given owner has an active (ie not expired) announcement registered

Specified by:
hasActiveAnnouncement in interface AnnouncementRegistry

registerAnnouncement

public long registerAnnouncement(Announcement topologyAnnouncement)
Description copied from interface: AnnouncementRegistry
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)

Specified by:
registerAnnouncement in interface AnnouncementRegistry
Returns:
the backoff interval (in seconds) for stable connectors - or -1 if the registration was not successful (likely indicating a loop)

addAllExcept

public void addAllExcept(Announcement target,
                         org.apache.sling.discovery.ClusterView clusterView,
                         AnnouncementFilter filter)
Description copied from interface: AnnouncementRegistry
Add all registered announcements to the given target announcement that are accepted by the given filter

Specified by:
addAllExcept in interface AnnouncementRegistry

checkExpiredAnnouncements

public void checkExpiredAnnouncements()
Description copied from interface: AnnouncementRegistry
Check for expired announcements and remove any if applicable

Specified by:
checkExpiredAnnouncements in interface AnnouncementRegistry

listInstances

public Collection<org.apache.sling.discovery.InstanceDescription> listInstances(org.apache.sling.discovery.ClusterView localClusterView)
Description copied from interface: AnnouncementRegistry
Returns the list of instances contained in all non-expired announcements of this registry

Specified by:
listInstances in interface AnnouncementRegistry


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.