|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ActionPolicy
ActionPolicy defines which aspects of a Service's behavior are currently allowed. Action policy implementations may be used to dynamically restrict aspects of the associated service, for example based on the dynamic state of the service or cluster membership.
For example, ActionPolicy could be used to define a quorum-based policy to prevent distribution from occurring before a certain fraction (a quorum) of the expected service members are present.
ActionPolicy implementations must exercise extreme caution since any delay or unhandled exception will cause a delay or complete shutdown of the corresponding service. ActionPolicy implementations must be thread-safe as the isAllowed(com.tangosol.net.Service, com.tangosol.net.Action)
method may be invoked on a service's worker threads.
Method Summary | |
---|---|
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. |
Method Detail |
---|
void init(Service service)
Note: A policy could be applied to multiple services.
service
- the service that this policy applies toboolean 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 performedjava.lang.String toString()
Note: this method may be used to provide information about this ActionPolicy to management interfaces.
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |