public static class ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy extends ConfigurableQuorumPolicy.MembershipQuorumPolicy
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy.ActionRule
Action Rules for  
ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy | 
static class  | 
ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy.Notification
Notification is a simple struct carrying the notification info. 
 | 
ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumListener, ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRuleConfigurableQuorumPolicy.ClusterQuorumPolicy, ConfigurableQuorumPolicy.MembershipQuorumPolicy, ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy, ConfigurableQuorumPolicy.ProxyQuorumPolicyBase.LoggingWriter, Base.StackFrame| Modifier and Type | Field and Description | 
|---|---|
protected AddressProvider | 
m_apRecovery
The recovery address-provider. 
 | 
protected boolean | 
m_fDynamic
If set to true, indicates a dynamic active recovery strategy. 
 | 
protected long | 
m_ldtLastReport
The last time disallowed actions were reported. 
 | 
static int | 
MASK_DISTRIBUTION
Bitmask used to encode a distribution action. 
 | 
protected static int | 
MASK_LAST
The highest used bitmask value. 
 | 
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 static int | 
calculateMinimumNodeCount(Set<Member> setMembers)
Given a set of Member objects, calculate the minimum number of nodes on a single machine. 
 | 
protected int | 
calculateMinThreshold(int cLast)
Calculate the minimum number of storage enabled nodes necessary to proceed with the service recovery. 
 | 
protected List<ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy.Notification> | 
checkRecoveryMembership(PartitionedService.PartitionRecoveryAction action)
Check if the recovery is allowed for the current membership. 
 | 
protected String | 
getActionName(int nMask)
Return the string description of the given rule mask. 
 | 
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. 
 | 
PartitionedService | 
getService()
Return the associated PartitionedService. 
 | 
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, List<ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy.Notification> listReasons)
Report all disallowed actions if the quorum rule has changed. 
 | 
protected static String | 
reportLastOwnership(PartitionSet parts, com.tangosol.net.internal.QuorumInfo info)
Report the machine names in the "last good" membership that owned the specified partitions. 
 | 
protected void | 
updateCurrentRule()
Update the currently applicable quorum rule, possibly changing it to reflect growth or shrinkage of the membership size. 
 | 
configure, getCurrentRule, getLeavingMembers, getQuorumRules, init, instantiateMemberListener, setCurrentRule, setQuorumRules, setService, toStringinstantiateClusterPolicy, 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, 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 static final int MASK_LAST
protected AddressProvider m_apRecovery
protected long m_ldtLastReport
protected boolean m_fDynamic
public PartitionedCacheQuorumPolicy(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] aRule, AddressProvider provider)
aRule - the quorum ruleprovider - the recovery address-providerprotected Set getOwnershipMemberSet()
public PartitionedService getService()
getService in class ConfigurableQuorumPolicy.MembershipQuorumPolicyprotected List<ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy.Notification> checkRecoveryMembership(PartitionedService.PartitionRecoveryAction action)
protected int calculateMinThreshold(int cLast)
cLast - the "last well-formed" member set sizeprotected static String reportLastOwnership(PartitionSet parts, com.tangosol.net.internal.QuorumInfo info)
parts - the partitions to reportinfo - the QuorumInfo containing the "last good" membership dataprotected static int calculateMinimumNodeCount(Set<Member> setMembers)
setMembers - the member setpublic 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 updateCurrentRule()
ConfigurableQuorumPolicy.MembershipQuorumPolicyupdateCurrentRule in class ConfigurableQuorumPolicy.MembershipQuorumPolicy
protected void reportDisallowedAction(int nMaskDisallowed,
                                      List<ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy.Notification> listReasons)
nMaskDisallowed - a mask of the disallowed actionlistReasons - (optional) a list of rejection reasonsprotected String getActionName(int nMask)
nMask - the bitmask