|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-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.ClusterQuorumPolicy
public static class ConfigurableQuorumPolicy.ClusterQuorumPolicy
ClusterQuorumPolicy defines an action policy that is applicable to the cluster.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.tangosol.net.ConfigurableQuorumPolicy |
---|
ConfigurableQuorumPolicy.ClusterQuorumPolicy, ConfigurableQuorumPolicy.MembershipQuorumPolicy, ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy, ConfigurableQuorumPolicy.ProxyQuorumPolicy, ConfigurableQuorumPolicy.WrapperQuorumPolicy |
Field Summary | |
---|---|
protected java.util.Map |
m_mapQuorumByRole The cluster membership quorum map, keyed by role name. |
protected Service |
m_service The cluster service. |
static java.lang.String |
ROLE_ALL The role identifier to use for matching any cluster members. |
Constructor Summary | |
---|---|
protected |
ConfigurableQuorumPolicy.ClusterQuorumPolicy(java.util.Map mapQuorum) Construct a ClusterQuorumPolicy with the specified quorum map. |
Method Summary | |
---|---|
protected boolean |
checkRoleQuorum(java.lang.String sRole, java.util.Set setMembers, java.util.Set setTimedOut, java.util.Set setHealthy, java.util.Set setAnnouncing) Check whether the cluster quorum for the specified role will be satisfied if the set of suspect members is disconnected from the cluster, given the sets of "healthy" and "announcing" members. |
protected java.util.Set |
ensureSet(java.util.Set set) Return the specified set, or an empty set if null. |
protected java.util.Map |
getClusterQuorumMap() Return the cluster quorum map, keyed by role name. |
Service |
getService() Return the Cluster service. |
java.lang.String |
getStatusDescription() Return a String that describes the current Quorum state. |
protected java.util.Map |
groupMembersByRole(java.util.Set setMembers) Group the specified set of Members by their roles. |
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. |
protected void |
setClusterQuorumMap(java.util.Map mapQuorumByRole) Set the cluster quorum map, keyed by role name. |
void |
setService(Service service) Set the Cluster service. |
Methods inherited from class com.tangosol.net.ConfigurableQuorumPolicy |
---|
instantiateClusterPolicy, instantiatePartitionedCachePolicy, instantiateProxyPolicy |
Methods inherited from interface com.tangosol.net.ActionPolicy |
---|
toString |
Field Detail |
---|
public static final java.lang.String ROLE_ALL
protected Service m_service
protected java.util.Map m_mapQuorumByRole
Constructor Detail |
---|
protected ConfigurableQuorumPolicy.ClusterQuorumPolicy(java.util.Map mapQuorum)
mapQuorum
- cluster quorum mapMethod Detail |
---|
protected java.util.Map getClusterQuorumMap()
protected void setClusterQuorumMap(java.util.Map mapQuorumByRole)
mapQuorumByRole
- the cluster quorum mappublic Service getService()
public void setService(Service service)
service
- the Cluster servicepublic java.lang.String getStatusDescription()
getStatusDescription
in class ConfigurableQuorumPolicy
protected java.util.Set ensureSet(java.util.Set set)
set
- the set to ensure, or nullprotected java.util.Map groupMembersByRole(java.util.Set setMembers)
setMembers
- the set of Membersprotected boolean checkRoleQuorum(java.lang.String sRole, java.util.Set setMembers, java.util.Set setTimedOut, java.util.Set setHealthy, java.util.Set setAnnouncing)
sRole
- the configured role name, or ROLE_ANY if none was configuredsetMembers
- the set of cluster members in the specified rolesetTimedOut
- the subset of cluster members in the specified role that are timed-out. A member is considered timed-out if it has not responded to some network communications within the configured timeout, and it has been selected for terminationsetHealthy
- the subset of cluster members in the specified role that are known to be "healthy". A member is "healthy" if it has been "recently" heard fromsetAnnouncing
- the set of potential new cluster members in the specified role that are announcing their presence and waiting to join the clusterpublic void init(Service service)
Note: A policy could be applied to multiple services.
init
in interface ActionPolicy
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.
isAllowed
in interface ActionPolicy
service
- the service that is performing the actionaction
- the action that is being performed
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |