public abstract static class ConfigurableQuorumPolicy.MembershipQuorumPolicy extends ConfigurableQuorumPolicy
| Modifier and Type | Class and Description |
|---|---|
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.
|
ConfigurableQuorumPolicy.ClusterQuorumPolicy, ConfigurableQuorumPolicy.MembershipQuorumPolicy, ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy, ConfigurableQuorumPolicy.ProxyQuorumPolicyBase.LoggingWriter, Base.StackFrame| Modifier and Type | Field and Description |
|---|---|
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] |
m_aRules
The array of quorum rules.
|
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule |
m_ruleCurrent
The current state.
|
protected Service |
m_service
The Service that this policy applies to.
|
protected Set |
m_setLeaving
The set of leaving members.
|
| Modifier | Constructor and Description |
|---|---|
protected |
MembershipQuorumPolicy()
Create a MembershipQuorumPolicy.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
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.
|
getStatusDescription, instantiateClusterPolicy, instantiatePartitionedCachePolicy, instantiateProxyPolicyazzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, waitclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisAllowedprotected Set m_setLeaving
protected Service m_service
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule m_ruleCurrent
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] m_aRules
protected MembershipQuorumPolicy()
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 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 String toString()
Note: this method may be used to provide information about this ActionPolicy to management interfaces.
toString in interface ActionPolicytoString in class Objectprotected MemberListener instantiateMemberListener()