|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
| 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
protected 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.QuorumListenerQuorumListener is used to subscribe the quorum policy to receive service membership events. |
protected static class |
ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRuleA 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_aRulesThe list of quorum rules. |
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule |
m_ruleCurrentThe current state. |
protected Service |
m_serviceThe Service that this policy applies to. |
protected Set |
m_setLeavingThe set of leaving members. |
| Fields inherited from class com.tangosol.net.ConfigurableQuorumPolicy |
|---|
m_xmlConfig |
| Constructor Summary | |
|---|---|
protected |
ConfigurableQuorumPolicy.MembershipQuorumPolicy(XmlElement xmlConfig)Create a MembershipQuorumPolicy using the specified Xml configuration. |
| 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 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. |
protected static int |
getQuorumValue(XmlElement xmlConfig, String sElement)Helper function to validate and return the specified quorum element from a quorum-policy configuration element. |
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. |
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 |
|---|
createPolicy, getConfig, getStatusDescription, instantiateClusterPolicy, instantiatePartitionedCachePolicy, instantiateProxyPolicy |
| Methods inherited from interface com.tangosol.net.ActionPolicy |
|---|
isAllowed |
| Field Detail |
|---|
protected Set m_setLeaving
protected Service m_service
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule m_ruleCurrent
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] m_aRules
| Constructor Detail |
|---|
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy(XmlElement xmlConfig)
xmlConfig - the Xml configuration| 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 Set getLeavingMembers()
protected int getPolicyPopulation()
protected static int getQuorumValue(XmlElement xmlConfig,
String sElement)
xmlConfig - the quorum-policy configuration elementsElement - the name of the quorum element to readprotected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] sortByThreshold(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] aRule)
aRule - the list of rules to sortprotected void configure(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] aRule)
aRule - the list of quorum rules to configure for this policyprotected void updateCurrentRule()
public void init(Service service)
service - the service that this policy applies topublic String toString()
protected MemberListener instantiateMemberListener()
|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||