Modifier and Type | Method and Description |
---|---|
static org.apache.sling.discovery.base.commons.BaseDiscoveryService |
DiscoveryServiceImpl.testConstructor(org.apache.sling.api.resource.ResourceResolverFactory resourceResolverFactory,
org.apache.sling.discovery.base.connectors.announcement.AnnouncementRegistry announcementRegistry,
org.apache.sling.discovery.base.connectors.ping.ConnectorRegistry connectorRegistry,
ClusterViewServiceImpl clusterViewService,
HeartbeatHandler heartbeatHandler,
org.apache.sling.settings.SlingSettingsService settingsService,
org.apache.sling.commons.scheduler.Scheduler scheduler,
Config config,
org.apache.sling.discovery.commons.providers.spi.base.SyncTokenService syncTokenServiceOrNull)
for testing only
|
Modifier and Type | Method and Description |
---|---|
static org.apache.sling.discovery.base.commons.ClusterViewService |
ClusterViewServiceImpl.testConstructor(org.apache.sling.settings.SlingSettingsService settingsService,
org.apache.sling.api.resource.ResourceResolverFactory factory,
Config config) |
Modifier and Type | Method and Description |
---|---|
static VotingView |
VotingHelper.getWinningVoting(org.apache.sling.api.resource.ResourceResolver resourceResolver,
Config config)
Return the still valid (ongoing) and winning (received a yes vote
from everybody) voting
|
static List<VotingView> |
VotingHelper.getYesVotingsOf(org.apache.sling.api.resource.ResourceResolver resourceResolver,
Config config,
String slingId)
Returns the voting for which the given slingId has vote yes or was the
initiator (which is equal to yes).
|
boolean |
VotingView.isOngoingVoting(Config config)
Checks whether this voting is still ongoing - that is, whether
a valid votingStart is set and whether that's within the heartbeat timeout configured
|
boolean |
VotingView.isTimedoutVoting(Config config)
Checks whether this voting has timed out - that is, whether
there is a valid votingStart set and whether that has timed out
|
static List<VotingView> |
VotingHelper.listOpenNonWinningVotings(org.apache.sling.api.resource.ResourceResolver resourceResolver,
Config config)
List all the votings that are currently 'open' but 'not winning'.
|
static List<VotingView> |
VotingHelper.listTimedoutVotings(org.apache.sling.api.resource.ResourceResolver resourceResolver,
Config config)
List all the votings that have timed out
|
static List<VotingView> |
VotingHelper.listVotings(org.apache.sling.api.resource.ResourceResolver resourceResolver,
Config config) |
String |
VotingView.matchesLiveView(Config config)
Checks if this voting matches the current live view
|
static VotingView |
VotingView.newVoting(org.apache.sling.api.resource.ResourceResolver resourceResolver,
Config config,
String newViewId,
String initiatorId,
Set<String> liveInstances)
Create a new voting with the given list of instances, the given
voting/view id and the given slingid of the initiator.
|
static VotingHandler |
VotingHandler.testConstructor(org.apache.sling.settings.SlingSettingsService settingsService,
org.apache.sling.api.resource.ResourceResolverFactory factory,
Config config)
for testing only
|
Modifier and Type | Method and Description |
---|---|
static Set<String> |
ViewHelper.determineLiveInstances(org.apache.sling.api.resource.Resource clusterInstancesResource,
Config config)
Return the list of cluster instances that are 'live', ie that have
sent a heartbeat within the configured heartbeat timeout
|
static View |
ViewHelper.getEstablishedView(org.apache.sling.api.resource.ResourceResolver resourceResolver,
Config config)
Return the currently established cluster view - or null if there is no
cluster view established at the moment.
|
String |
View.matchesLiveView(org.apache.sling.api.resource.Resource clusterInstancesRes,
Config config)
Checks whether this view matches the 'live view' as represented in the clusterInstances resource
|
Modifier and Type | Method and Description |
---|---|
static HeartbeatHandler |
HeartbeatHandler.testConstructor(org.apache.sling.settings.SlingSettingsService slingSettingsService,
org.apache.sling.api.resource.ResourceResolverFactory factory,
org.apache.sling.discovery.base.connectors.announcement.AnnouncementRegistry announcementRegistry,
org.apache.sling.discovery.base.connectors.ping.ConnectorRegistry connectorRegistry,
Config config,
org.apache.sling.commons.scheduler.Scheduler scheduler,
VotingHandler votingHandler)
for testing only
|
Constructor and Description |
---|
EstablishedClusterView(Config config,
View view,
String localId)
Construct a new established cluster view
|
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.