Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


com.tangosol.net
Class ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule

java.lang.Object
  extended by com.tangosol.net.ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule

Enclosing class:
ConfigurableQuorumPolicy.MembershipQuorumPolicy

protected static class ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule
extends java.lang.Object

A quorum rule defines a set of allowable actions beyond the rule's threshold size.


Field Summary
protected static ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule ALL_ALLOWED
          A QuorumRule that permits all actions.
protected static ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule NONE_ALLOWED
          A QuorumRule that rejects all actions.

 

Constructor Summary
protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule(int nRuleMask, int nThreshold)
          Construct a state with the specified threshold and numeric representation.

 

Method Summary
protected  boolean contains(int nMask)
          Return true iff the current rule contains the specified action mask.
protected  int getRuleMask()
          Return the numeric representation of the actions allowed by this rule.
protected  int getThreshold()
          Return the size threshold for this rule.
protected  void setRuleMask(int nRuleMask)
          Set the numeric representation of the actions allowed by this rule.
protected  void setThreshold(int nThreshold)
          Set the size threshold for this rule.
 java.lang.String toString()
          
protected  ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule union(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule rule)
          Return a quorum rule composed from this and the specified rule that reflects the "union" of the two rules.

 

Field Detail

NONE_ALLOWED

protected static final ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule NONE_ALLOWED
A QuorumRule that rejects all actions.

ALL_ALLOWED

protected static final ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule ALL_ALLOWED
A QuorumRule that permits all actions.

Constructor Detail

ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule

protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule(int nRuleMask,
                                                                     int nThreshold)
Construct a state with the specified threshold and numeric representation.
Parameters:
nRuleMask - numeric representation of the state
nThreshold - the size threshold of the state

Method Detail

toString

public java.lang.String toString()

contains

protected boolean contains(int nMask)
Return true iff the current rule contains the specified action mask.
Parameters:
nMask - the action bitmask to test for
Returns:
true iff the current rule contains the specified action mask

union

protected ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule union(ConfigurableQuorumPolicy.MembershipQuorumPolicy.QuorumRule rule)
Return a quorum rule composed from this and the specified rule that reflects the "union" of the two rules. The union of two rules A and B requires a membership threshold that is max(A.getThreshold(), A.getThreshold()) and allows all actions allowed by A or B.
Parameters:
rule - the rule to compute the union of this with
Returns:
a quorum rule representing the union with the specified rule

getRuleMask

protected int getRuleMask()
Return the numeric representation of the actions allowed by this rule.
Returns:
the numeric representation of this rule

setRuleMask

protected void setRuleMask(int nRuleMask)
Set the numeric representation of the actions allowed by this rule.
Parameters:
nRuleMask - the numeric representation of this rule

getThreshold

protected int getThreshold()
Return the size threshold for this rule.
Returns:
the size threshold for this rule

setThreshold

protected void setThreshold(int nThreshold)
Set the size threshold for this rule.
Parameters:
nThreshold - the size threshold for this rule

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


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