@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 BaseViewCheckerprotected BaseConfig getConnectorConfig()
getConnectorConfig in class BaseViewCheckerprotected ConnectorRegistry getConnectorRegistry()
getConnectorRegistry in class BaseViewCheckerprotected ResourceResolverFactory getResourceResolverFactory()
getResourceResolverFactory in class BaseViewCheckerprotected Scheduler getScheduler()
getScheduler in class BaseViewCheckerprotected SlingSettingsService getSlingSettingsService()
getSlingSettingsService in class BaseViewCheckerprotected void doActivate()
doActivate in class BaseViewCheckerprotected void deactivate()
deactivate in class BaseViewCheckerpublic void initialize(OakDiscoveryService discoveryService)
public boolean resetLeaderElectionId()
protected void doCheckView()
BaseViewCheckerdoCheckView in class BaseViewCheckerprotected void updateProperties()
updateProperties in class BaseViewCheckerCopyright © 2017 The Apache Software Foundation. All rights reserved.