@Service(value=OakViewChecker.class) @Reference(referenceInterface=org.osgi.service.http.HttpService.class, cardinality=OPTIONAL_MULTIPLE, policy=DYNAMIC) public class OakViewChecker extends BaseViewChecker
Remote heartbeats are POSTs to remote TopologyConnectorServlets using discovery.base
Modifier and Type | Field and Description |
---|---|
protected AnnouncementRegistry |
announcementRegistry |
protected ConnectorRegistry |
connectorRegistry |
protected PeriodicBackgroundJob |
periodicCheckViewJob |
protected ResourceResolverFactory |
resourceResolverFactory |
protected Scheduler |
scheduler |
protected SlingSettingsService |
slingSettingsService |
activated, context, endpoints, lock, logger, NAME, periodicPingJob, PROPERTY_ID_ENDPOINTS, PROPERTY_ID_RUNTIME, PROPERTY_ID_SLING_HOME_PATH, runtimeId, slingId
Constructor and Description |
---|
OakViewChecker() |
Modifier and Type | Method and Description |
---|---|
protected void |
deactivate() |
protected void |
doActivate() |
protected void |
doCheckView()
Check whether the established view matches the reality, ie matches the
heartbeats
|
protected AnnouncementRegistry |
getAnnouncementRegistry() |
protected BaseConfig |
getConnectorConfig() |
protected ConnectorRegistry |
getConnectorRegistry() |
protected ResourceResolverFactory |
getResourceResolverFactory() |
protected Scheduler |
getScheduler() |
protected SlingSettingsService |
getSlingSettingsService() |
void |
initialize(OakDiscoveryService discoveryService)
The initialize method is called by the OakDiscoveryService.activate
as we require the discoveryService (and the discoveryService has
a reference on us - but we cant have circular references in osgi).
|
boolean |
resetLeaderElectionId()
Hook that will cause a reset of the leaderElectionId
on next invocation of issueClusterLocalHeartbeat.
|
static OakViewChecker |
testConstructor(SlingSettingsService slingSettingsService,
ResourceResolverFactory resourceResolverFactory,
ConnectorRegistry connectorRegistry,
AnnouncementRegistry announcementRegistry,
Scheduler scheduler,
Config config)
for testing only
|
protected void |
updateProperties() |
activate, bindHttpService, checkView, getEndpointsAsString, heartbeatAndCheckView, issueConnectorPings, issueHeartbeat, run, triggerAsyncConnectorPing, unbindHttpService
@Reference protected SlingSettingsService slingSettingsService
@Reference protected ResourceResolverFactory resourceResolverFactory
@Reference protected ConnectorRegistry connectorRegistry
@Reference protected AnnouncementRegistry announcementRegistry
@Reference protected Scheduler scheduler
protected PeriodicBackgroundJob periodicCheckViewJob
public static OakViewChecker testConstructor(SlingSettingsService slingSettingsService, ResourceResolverFactory resourceResolverFactory, ConnectorRegistry connectorRegistry, AnnouncementRegistry announcementRegistry, Scheduler scheduler, Config config)
protected AnnouncementRegistry getAnnouncementRegistry()
getAnnouncementRegistry
in class BaseViewChecker
protected BaseConfig getConnectorConfig()
getConnectorConfig
in class BaseViewChecker
protected ConnectorRegistry getConnectorRegistry()
getConnectorRegistry
in class BaseViewChecker
protected ResourceResolverFactory getResourceResolverFactory()
getResourceResolverFactory
in class BaseViewChecker
protected Scheduler getScheduler()
getScheduler
in class BaseViewChecker
protected SlingSettingsService getSlingSettingsService()
getSlingSettingsService
in class BaseViewChecker
protected void doActivate()
doActivate
in class BaseViewChecker
protected void deactivate()
deactivate
in class BaseViewChecker
public void initialize(OakDiscoveryService discoveryService)
public boolean resetLeaderElectionId()
protected void doCheckView()
BaseViewChecker
doCheckView
in class BaseViewChecker
protected void updateProperties()
updateProperties
in class BaseViewChecker
Copyright © 2017 The Apache Software Foundation. All rights reserved.