|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.net.ConfigurableQuorumPolicy
com.tangosol.net.ConfigurableQuorumPolicy.MembershipQuorumPolicy
public abstract static class ConfigurableQuorumPolicy.MembershipQuorumPolicy
MembershipQuorumPolicy is a quorum policy that is stateless and based solely on service membership sizes. MembershipQuorumPolicy uses a state-machine that encodes the allowable Actions, and uses MemberEvents to maintain the state-machine as the service membership changes.
Nested Class Summary | |
---|---|
protected class |
ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumListener QuorumListener is used to subscribe the quorum policy to receive service membership events. |
static class |
ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule A quorum rule defines a set of allowable actions beyond the rule's threshold size. |
Nested classes/interfaces inherited from class com.tangosol.net.ConfigurableQuorumPolicy |
---|
ConfigurableQuorumPolicy.ClusterQuorumPolicy, ConfigurableQuorumPolicy.MembershipQuorumPolicy, ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy, ConfigurableQuorumPolicy.ProxyQuorumPolicy, ConfigurableQuorumPolicy.WrapperQuorumPolicy |
Field Summary | |
---|---|
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] |
m_aRules The list of quorum rules. |
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule |
m_ruleCurrent The current state. |
protected Service |
m_service The Service that this policy applies to. |
protected java.util.Set |
m_setLeaving The set of leaving members. |
Constructor Summary | |
---|---|
protected |
ConfigurableQuorumPolicy.MembershipQuorumPolicy() Create a MembershipQuorumPolicy. |
Method Summary | |
---|---|
protected void |
configure(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] aRule) Configure and initialize this policy with the specified quorum rules. |
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule |
getCurrentRule() Return the current quorum rule used by the policy. |
protected java.util.Set |
getLeavingMembers() Return the set of members that are leaving the associated service |
protected int |
getPolicyPopulation() Calculate and return the current size of the member set that contributes to the quorum for this policy domain. |
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] |
getQuorumRules() Return the quorum rules used by this policy. |
Service |
getService() Return the Service which this policy applies to. |
void |
init(Service service) Called when the specified service loads and configures this policy. |
protected MemberListener |
instantiateMemberListener() Instantiate a member listener to subscribe to service membership events. |
protected void |
setCurrentRule(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule ruleCurrent) Set the current quorum rule used by the policy. |
protected void |
setQuorumRules(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] aRule) Set the quorum rules used by this policy. |
protected void |
setService(Service service) Set the service that this policy applies to. |
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] |
sortByThreshold(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] aRule) Sort the specified list of rules in ascending order of member threshold. |
java.lang.String |
toString() Return a human-readable String representation of this ActionPolicy. |
protected void |
updateCurrentRule() Update the currently applicable quorum rule, possibly changing it to reflect growth or shrinkage of the membership size. |
Methods inherited from class com.tangosol.net.ConfigurableQuorumPolicy |
---|
getStatusDescription, instantiateClusterPolicy, instantiatePartitionedCachePolicy, instantiateProxyPolicy |
Methods inherited from interface com.tangosol.net.ActionPolicy |
---|
isAllowed |
Field Detail |
---|
protected java.util.Set m_setLeaving
protected Service m_service
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule m_ruleCurrent
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] m_aRules
Constructor Detail |
---|
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy()
Method Detail |
---|
public Service getService()
protected void setService(Service service)
service
- the Service that this policy applies toprotected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule getCurrentRule()
protected void setCurrentRule(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule ruleCurrent)
ruleCurrent
- the current quorum rule used by the policyprotected void setQuorumRules(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] aRule)
aRule
- the quorum rules used by this policyprotected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] getQuorumRules()
protected java.util.Set getLeavingMembers()
protected int getPolicyPopulation()
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] sortByThreshold(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] aRule)
aRule
- the list of rules to sortprotected void configure(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] aRule)
aRule
- the array of quorum rules to configure for this policyprotected void updateCurrentRule()
public void init(Service service)
Note: A policy could be applied to multiple services.
service
- the service that this policy applies topublic java.lang.String toString()
Note: this method may be used to provide information about this ActionPolicy to management interfaces.
protected MemberListener instantiateMemberListener()
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |