Skip to content

Commit

Permalink
added start/stopFailureDetection(): allows to turn off failure detect…
Browse files Browse the repository at this point in the history
…ion via JMX/probe.sh
  • Loading branch information
belaban committed Feb 11, 2011
1 parent aa90da9 commit 42dbff4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/org/jgroups/protocols/FD.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -168,6 +168,16 @@ protected Monitor createMonitor() {
return new Monitor(); return new Monitor();
} }


@ManagedOperation(description="Stops checking for crashed members")
public void stopFailureDetection() {
stopMonitor();
}

@ManagedOperation(description="Resumes checking for crashed members")
public void startFailureDetection() {
startMonitor();
}

/** Requires lock to held by caller */ /** Requires lock to held by caller */
@GuardedBy("lock") @GuardedBy("lock")
private void startMonitor() { private void startMonitor() {
Expand Down
10 changes: 10 additions & 0 deletions src/org/jgroups/protocols/FD_ALL.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ public String printSuspectHistory() {
public String printTimestamps() { public String printTimestamps() {
return _printTimestamps(); return _printTimestamps();
} }

@ManagedOperation(description="Stops checking for crashed members")
public void stopFailureDetection() {
stopTimeoutChecker();
}

@ManagedOperation(description="Resumes checking for crashed members")
public void startFailureDetection() {
startTimeoutChecker();
}




public void resetStats() { public void resetStats() {
Expand Down

0 comments on commit 42dbff4

Please sign in to comment.