Package org.jgroups.protocols.rules
Class CheckFDMonitor
- java.lang.Object
-
- org.jgroups.protocols.rules.Rule
-
- org.jgroups.protocols.rules.CheckFDMonitor
-
- All Implemented Interfaces:
java.lang.Runnable
public class CheckFDMonitor extends Rule
Rule which checks if the FD monitor is running when we have more than 1 member. If not, starts it. The rule uninstalls itself if no FD protocol is found.- Since:
- 3.3
- Author:
- Bela Ban
-
-
Constructor Summary
Constructors Constructor Description CheckFDMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
condition()
Returns a description of the condition that led toRule.eval()
returning truejava.lang.String
description()
Describes what the rules doesboolean
eval()
Evaluates the condition.void
init()
Called when rule is installedjava.lang.String
name()
Returns the name of the rule.java.lang.String
toString()
void
trigger()
The action of the rule.-
Methods inherited from class org.jgroups.protocols.rules.Rule
destroy, log, run, supervisor
-
-
-
-
Field Detail
-
fd
protected FD fd
-
-
Method Detail
-
name
public java.lang.String name()
Description copied from class:Rule
Returns 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:Rule
Describes what the rules does- Specified by:
description
in classRule
-
init
public void init()
Description copied from class:Rule
Called when rule is installed
-
eval
public boolean eval()
Description copied from class:Rule
Evaluates 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:Rule
Returns a description of the condition that led toRule.eval()
returning true
-
trigger
public void trigger() throws java.lang.Throwable
Description copied from class:Rule
The action of the rule. Triggered ifRule.eval()
returned true
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-