Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


com.tangosol.net
Class ConfigurableQuorumPolicy.WrapperQuorumPolicy

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

All Implemented Interfaces:
ActionPolicy
Enclosing class:
ConfigurableQuorumPolicy

protected static class ConfigurableQuorumPolicy.WrapperQuorumPolicy
extends ConfigurableQuorumPolicy

WrapperQuorumPolicy is a ConfigurableQuorumPolicy that wraps an arbitrary ActionPolicy instance.


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  ActionPolicy m_policy
          The wrapped ActionPolicy

 

Fields inherited from class com.tangosol.net.ConfigurableQuorumPolicy
m_xmlConfig

 

Constructor Summary
protected ConfigurableQuorumPolicy.WrapperQuorumPolicy(ActionPolicy policy, XmlElement xmlConfig)
          Create a WrapperQuorumPolicy around the specified ActionPolicy, instantiated by the specified configuration.

 

Method Summary
 ActionPolicy getPolicy()
          Return the wrapped ActionPolicy.
 java.lang.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.
 java.lang.String toString()
          Return a human-readable String representation of this ActionPolicy.

 

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

 

Field Detail

m_policy

protected ActionPolicy m_policy
The wrapped ActionPolicy

Constructor Detail

ConfigurableQuorumPolicy.WrapperQuorumPolicy

protected ConfigurableQuorumPolicy.WrapperQuorumPolicy(ActionPolicy policy,
                                                       XmlElement xmlConfig)
Create a WrapperQuorumPolicy around the specified ActionPolicy, instantiated by the specified configuration.
Parameters:
policy - the ActionPolicy to wrap
xmlConfig - the configuration used to instantiate the policy

Method Detail

getPolicy

public ActionPolicy getPolicy()
Return the wrapped ActionPolicy.
Returns:
the wrapped ActionPolicy

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

init

public void init(Service service)
Called when the specified service loads and configures this policy.

Note: A policy could be applied to multiple services.

Parameters:
service - the service that this policy applies to

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

toString

public java.lang.String toString()
Return a human-readable String representation of this ActionPolicy.

Note: this method may be used to provide information about this ActionPolicy to management interfaces.


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.