public static class ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy extends ConfigurableQuorumPolicy.MembershipQuorumPolicy
| Modifier and Type | Class and Description |
|---|---|
static class |
ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy.ActionRule
Action Rules for
ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy |
ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumListener, ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRuleConfigurableQuorumPolicy.ClusterQuorumPolicy, ConfigurableQuorumPolicy.MembershipQuorumPolicy, ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy, ConfigurableQuorumPolicy.ProxyQuorumPolicy, ConfigurableQuorumPolicy.WrapperQuorumPolicyBase.LoggingWriter, Base.StackFrame| Modifier and Type | Field and Description |
|---|---|
protected AddressProvider |
m_apRecovery
The recovery address-provider.
|
protected boolean |
m_fReportRuleChange
Whether the quorum rule has changed and disallowed actions should be reported.
|
static int |
MASK_DISTRIBUTION
Bitmask used to encode a distribution action.
|
static int |
MASK_READ
Bitmask used to encode a read action.
|
static int |
MASK_RECOVER
Bitmask used to encode a recover action.
|
static int |
MASK_RESTORE
Bitmask used to encode a partition restore action.
|
static int |
MASK_WRITE
Bitmask used to encode a write action.
|
m_aRules, m_ruleCurrent, m_service, m_setLeaving| Constructor and Description |
|---|
PartitionedCacheQuorumPolicy(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] aRule, AddressProvider provider)
Construct a PartitionedCacheQuorumPolicy with the specified rule.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkRecoveryAddresses()
Check that all of the recovery addresses are represented by the ownership-enabled members.
|
protected String |
getActionName(int nMask)
Return the string description of the given mask (rule).
|
protected Set |
getOwnershipMemberSet()
Return the set of ownership-enabled members in the associated PartitionedService.
|
int |
getPolicyPopulation()
Calculate and return the current size of the member set that contributes to the quorum for this policy domain.
|
String |
getStatusDescription()
Return a String that describes the current Quorum state.
|
boolean |
isAllowed(Service service, Action action)
Evaluate if the specified action is currently allowed by this policy.
|
protected void |
reportDisallowedAction(int nMaskDisallowed)
Report all disallowed actions if the quorum rule has changed.
|
protected void |
setCurrentRule(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule ruleCurrent)
Set the current quorum rule used by the policy.
|
configure, getCurrentRule, getLeavingMembers, getQuorumRules, getService, init, instantiateMemberListener, setQuorumRules, setService, sortByThreshold, toString, updateCurrentRuleinstantiateClusterPolicy, 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, 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, waitpublic static final int MASK_DISTRIBUTION
public static final int MASK_RESTORE
public static final int MASK_READ
public static final int MASK_WRITE
public static final int MASK_RECOVER
protected AddressProvider m_apRecovery
protected boolean m_fReportRuleChange
public PartitionedCacheQuorumPolicy(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] aRule, AddressProvider provider)
aRule - the quorum rule.provider - the recovery address-providerprotected Set getOwnershipMemberSet()
protected boolean checkRecoveryAddresses()
public String getStatusDescription()
getStatusDescription in class ConfigurableQuorumPolicypublic int getPolicyPopulation()
Note: The quorum for PartitionedService is determined by the ownership-enabled members only.
getPolicyPopulation in class ConfigurableQuorumPolicy.MembershipQuorumPolicypublic boolean isAllowed(Service service, Action action)
Note: for forward compatibility, implementations should generally return true for actions that are not recognized.
service - the service that is performing the actionaction - the action that is being performedprotected void setCurrentRule(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule ruleCurrent)
ConfigurableQuorumPolicy.MembershipQuorumPolicysetCurrentRule in class ConfigurableQuorumPolicy.MembershipQuorumPolicyruleCurrent - the current quorum rule used by the policyprotected void reportDisallowedAction(int nMaskDisallowed)
nMaskDisallowed - a mask of the disallowed actionprotected String getActionName(int nMask)
nMask - the bitmask