|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.discovery.impl.cluster.voting.VotingHelper
public class VotingHelper
Helper class for voting
Constructor Summary | |
---|---|
VotingHelper()
|
Method Summary | |
---|---|
static VotingView |
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 VotingView |
getYesVotingOf(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). |
static List<VotingView> |
listOpenNonWinningVotings(org.apache.sling.api.resource.ResourceResolver resourceResolver,
Config config)
List all the votings that are currently 'open' but 'not winning'. |
static List<VotingView> |
listTimedoutVotings(org.apache.sling.api.resource.ResourceResolver resourceResolver,
Config config)
List all the votings that have timed out |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VotingHelper()
Method Detail |
---|
public static List<VotingView> listOpenNonWinningVotings(org.apache.sling.api.resource.ResourceResolver resourceResolver, Config config)
'Open' means that they have not expired yet, have zero no-votes, and match the view that this instance has of the cluster.
'Not winning' means that a voting still did not receive a vote from everybody
public static List<VotingView> listTimedoutVotings(org.apache.sling.api.resource.ResourceResolver resourceResolver, Config config)
public static VotingView getWinningVoting(org.apache.sling.api.resource.ResourceResolver resourceResolver, Config config)
public static VotingView getYesVotingOf(org.apache.sling.api.resource.ResourceResolver resourceResolver, Config config, String slingId)
slingId
- the instance for which its yes vote should be looked up
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |