public static class ConfigurableQuorumPolicy.WrapperQuorumPolicy extends ConfigurableQuorumPolicy
ConfigurableQuorumPolicy.ClusterQuorumPolicy, ConfigurableQuorumPolicy.MembershipQuorumPolicy, ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy, ConfigurableQuorumPolicy.ProxyQuorumPolicy, ConfigurableQuorumPolicy.WrapperQuorumPolicy
Base.LoggingWriter, Base.StackFrame
Modifier and Type | Field and Description |
---|---|
protected ActionPolicy |
f_policy
The wrapped ActionPolicy
|
Constructor and Description |
---|
WrapperQuorumPolicy(ActionPolicy policy)
Create a WrapperQuorumPolicy around the specified ActionPolicy, instantiated by the specified configuration.
|
Modifier and Type | Method and Description |
---|---|
ActionPolicy |
getPolicy()
Return the wrapped ActionPolicy.
|
String |
getStatusDescription()
Return a String that describes the current Quorum state.
|
void |
init(Service service)
Called when the specified service loads and configures this policy.
|
boolean |
isAllowed(Service service, Action action)
Evaluate if the specified action is currently allowed by this policy.
|
String |
toString()
Return a human-readable String representation of this ActionPolicy.
|
instantiateClusterPolicy, instantiatePartitionedCachePolicy, instantiateProxyPolicy
azzert, 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, wait
protected final ActionPolicy f_policy
public WrapperQuorumPolicy(ActionPolicy policy)
policy
- the ActionPolicy to wrappublic ActionPolicy getPolicy()
public String getStatusDescription()
getStatusDescription
in class ConfigurableQuorumPolicy
public void init(Service service)
Note: A policy could be applied to multiple services.
service
- the service that this policy applies topublic 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 performedpublic String toString()
Note: this method may be used to provide information about this ActionPolicy to management interfaces.
toString
in interface ActionPolicy
toString
in class Object