Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.net
Class ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.net.ConfigurableQuorumPolicy
          extended by com.tangosol.net.ConfigurableQuorumPolicy.MembershipQuorumPolicy
              extended by com.tangosol.net.ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy

All Implemented Interfaces:
ActionPolicy
Enclosing class:
ConfigurableQuorumPolicy

public static class ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy
extends ConfigurableQuorumPolicy.MembershipQuorumPolicy

PartitionedCacheQuorumPolicy defines a configurable quorum policy that is applicable to a DistributedCacheService.


Nested Class Summary

 

Nested classes/interfaces inherited from class com.tangosol.net.ConfigurableQuorumPolicy.MembershipQuorumPolicy
ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumListener, ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule

 

Nested classes/interfaces inherited from class com.tangosol.net.ConfigurableQuorumPolicy
ConfigurableQuorumPolicy.ClusterQuorumPolicy, ConfigurableQuorumPolicy.MembershipQuorumPolicy, ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy, ConfigurableQuorumPolicy.ProxyQuorumPolicy, ConfigurableQuorumPolicy.WrapperQuorumPolicy

 

Field Summary
protected  AddressProvider m_providerRecoveryAddr
          The recovery address-provider.
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.

 

Fields inherited from class com.tangosol.net.ConfigurableQuorumPolicy.MembershipQuorumPolicy
m_aRules, m_ruleCurrent, m_service, m_setLeaving

 

Constructor Summary
ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] aRule, AddressProvider provider)
          Construct a PartitionedCacheQuorumPolicy with the specified rule.

 

Method Summary
protected  boolean checkRecoveryAddresses()
          Check that all of the recovery addresses are represented by the ownership-enabled members.
protected  java.util.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.
 java.lang.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.

 

Methods inherited from class com.tangosol.net.ConfigurableQuorumPolicy.MembershipQuorumPolicy
configure, getCurrentRule, getLeavingMembers, getQuorumRules, getService, init, instantiateMemberListener, setCurrentRule, setQuorumRules, setService, sortByThreshold, toString, updateCurrentRule

 

Methods inherited from class com.tangosol.net.ConfigurableQuorumPolicy
instantiateClusterPolicy, instantiatePartitionedCachePolicy, instantiateProxyPolicy

 

Field Detail

MASK_DISTRIBUTION

public static final int MASK_DISTRIBUTION
Bitmask used to encode a distribution action.
See Also:
Constant Field Values

MASK_RESTORE

public static final int MASK_RESTORE
Bitmask used to encode a partition restore action.
See Also:
Constant Field Values

MASK_READ

public static final int MASK_READ
Bitmask used to encode a read action.
See Also:
Constant Field Values

MASK_WRITE

public static final int MASK_WRITE
Bitmask used to encode a write action.
See Also:
Constant Field Values

MASK_RECOVER

public static final int MASK_RECOVER
Bitmask used to encode a recover action.
See Also:
Constant Field Values

m_providerRecoveryAddr

protected AddressProvider m_providerRecoveryAddr
The recovery address-provider.

Constructor Detail

ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy

public ConfigurableQuorumPolicy.PartitionedCacheQuorumPolicy(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule[] aRule,
                                                             AddressProvider provider)
Construct a PartitionedCacheQuorumPolicy with the specified rule.
Parameters:
aRule - the quorum rule.
provider - the recovery address-provider

Method Detail

getOwnershipMemberSet

protected java.util.Set getOwnershipMemberSet()
Return the set of ownership-enabled members in the associated PartitionedService.
Returns:
the set of ownership-enabled members

checkRecoveryAddresses

protected boolean checkRecoveryAddresses()
Check that all of the recovery addresses are represented by the ownership-enabled members.
Returns:
true iff all of the recovery addresses are represented

getStatusDescription

public java.lang.String getStatusDescription()
Return a String that describes the current Quorum state.
Specified by:
getStatusDescription in class ConfigurableQuorumPolicy
Returns:
a String describing the allowed actions in the current state

getPolicyPopulation

public int getPolicyPopulation()
Calculate and return the current size of the member set that contributes to the quorum for this policy domain.

Note: The quorum for PartitionedService is determined by the ownership-enabled members only.

Overrides:
getPolicyPopulation in class ConfigurableQuorumPolicy.MembershipQuorumPolicy
Returns:
the current size

isAllowed

public boolean isAllowed(Service service,
                         Action action)
Evaluate if the specified action is currently allowed by this policy.

Note: for forward compatibility, implementations should generally return true for actions that are not recognized.

Parameters:
service - the service that is performing the action
action - the action that is being performed
Returns:
true iff the specified action is currently allowed by this policy

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.