org.jgroups.protocols.rules
Class CheckFDMonitor

java.lang.Object
  extended by org.jgroups.protocols.rules.Rule
      extended by 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

Field Summary
protected  FD fd
           
 
Fields inherited from class org.jgroups.protocols.rules.Rule
log, sv
 
Constructor Summary
CheckFDMonitor()
           
 
Method Summary
 java.lang.String condition()
          Returns a description of the condition that led to Rule.eval() returning true
 java.lang.String description()
          Describes what the rules does
 boolean eval()
          Evaluates the condition.
 void init()
          Called when rule is installed
 java.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fd

protected FD fd
Constructor Detail

CheckFDMonitor

public CheckFDMonitor()
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

Specified by:
name in class Rule

description

public java.lang.String description()
Description copied from class: Rule
Describes what the rules does

Specified by:
description in class Rule

init

public void init()
Description copied from class: Rule
Called when rule is installed

Overrides:
init in class Rule

eval

public boolean eval()
Description copied from class: Rule
Evaluates the condition. If true, the rule is triggered. If true, the next execution of Rule.condition() should return a non-null string

Specified by:
eval in class Rule

condition

public java.lang.String condition()
Description copied from class: Rule
Returns a description of the condition that led to Rule.eval() returning true

Specified by:
condition in class Rule

trigger

public void trigger()
             throws java.lang.Throwable
Description copied from class: Rule
The action of the rule. Triggered if Rule.eval() returned true

Specified by:
trigger in class Rule
Throws:
java.lang.Throwable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.