Package org.jgroups.protocols.rules
Class SampleRule
- java.lang.Object
-
- org.jgroups.protocols.rules.Rule
-
- org.jgroups.protocols.rules.SampleRule
-
- All Implemented Interfaces:
java.lang.Runnable
public class SampleRule extends Rule
- Since:
- 3.3
- Author:
- Bela Ban
-
-
Constructor Summary
Constructors Constructor Description SampleRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringcondition()Returns a description of the condition that led toRule.eval()returning truejava.lang.Stringdescription()Describes what the rules doesbooleaneval()Evaluates the condition.java.lang.Stringname()Returns the name of the rule.voidtrigger()The action of the rule.
-
-
-
Method Detail
-
name
public java.lang.String name()
Description copied from class:RuleReturns the name of the rule. Should be unique if a rule needs to be uninstalled
-
description
public java.lang.String description()
Description copied from class:RuleDescribes what the rules does- Specified by:
descriptionin classRule
-
eval
public boolean eval()
Description copied from class:RuleEvaluates the condition. If true, the rule is triggered. If true, the next execution ofRule.condition()should return a non-null string
-
condition
public java.lang.String condition()
Description copied from class:RuleReturns a description of the condition that led toRule.eval()returning true
-
trigger
public void trigger() throws java.lang.ThrowableDescription copied from class:RuleThe action of the rule. Triggered ifRule.eval()returned true
-
-