@Service(value=AnnouncementRegistry.class) public class AnnouncementRegistryImpl extends java.lang.Object implements AnnouncementRegistry
Constructor and Description |
---|
AnnouncementRegistryImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
activate() |
void |
addAllExcept(Announcement target,
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(java.lang.String ownerId)
Whether or not the given owner has an active (ie not expired) announcement registered
|
java.util.Collection<Announcement> |
listAnnouncementsInSameCluster(ClusterView localClusterView)
list all announcements that were received by instances in the local cluster
|
java.util.Collection<InstanceDescription> |
listInstances(ClusterView localClusterView)
Returns the list of instances contained in all non-expired announcements of this registry
|
java.util.Collection<Announcement> |
listLocalAnnouncements()
list all announcements that were received (incoming or inherited) by this instance
|
java.util.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)
|
static AnnouncementRegistryImpl |
testConstructor(ResourceResolverFactory resourceResolverFactory,
SlingSettingsService slingSettingsService,
BaseConfig config) |
static AnnouncementRegistryImpl |
testConstructorAndActivate(ResourceResolverFactory resourceResolverFactory,
SlingSettingsService slingSettingsService,
BaseConfig config) |
void |
unregisterAnnouncement(java.lang.String ownerId)
Unregister the announcement owned by the given slingId
|
public static AnnouncementRegistryImpl testConstructorAndActivate(ResourceResolverFactory resourceResolverFactory, SlingSettingsService slingSettingsService, BaseConfig config)
public static AnnouncementRegistryImpl testConstructor(ResourceResolverFactory resourceResolverFactory, SlingSettingsService slingSettingsService, BaseConfig config)
@Activate protected void activate()
public void unregisterAnnouncement(java.lang.String ownerId)
AnnouncementRegistry
unregisterAnnouncement
in interface AnnouncementRegistry
public java.util.Collection<Announcement> listLocalAnnouncements()
AnnouncementRegistry
listLocalAnnouncements
in interface AnnouncementRegistry
public java.util.Collection<CachedAnnouncement> listLocalIncomingAnnouncements()
AnnouncementRegistry
listLocalIncomingAnnouncements
in interface AnnouncementRegistry
public java.util.Collection<Announcement> listAnnouncementsInSameCluster(ClusterView localClusterView)
AnnouncementRegistry
listAnnouncementsInSameCluster
in interface AnnouncementRegistry
public boolean hasActiveAnnouncement(java.lang.String ownerId)
AnnouncementRegistry
hasActiveAnnouncement
in interface AnnouncementRegistry
public long registerAnnouncement(Announcement topologyAnnouncement)
AnnouncementRegistry
registerAnnouncement
in interface AnnouncementRegistry
public void addAllExcept(Announcement target, ClusterView clusterView, AnnouncementFilter filter)
AnnouncementRegistry
addAllExcept
in interface AnnouncementRegistry
public void checkExpiredAnnouncements()
AnnouncementRegistry
checkExpiredAnnouncements
in interface AnnouncementRegistry
public java.util.Collection<InstanceDescription> listInstances(ClusterView localClusterView)
AnnouncementRegistry
listInstances
in interface AnnouncementRegistry
Copyright © 2022 The Apache Software Foundation. All rights reserved.