Rice Pastry API

rice.pastry.socket
Class SocketCollectionManager.DeadChecker

java.lang.Object
  extended by rice.selector.TimerTask
      extended by rice.pastry.socket.SocketCollectionManager.DeadChecker
All Implemented Interfaces:
java.lang.Comparable, CancellableTask, PingResponseListener
Enclosing class:
SocketCollectionManager

protected class SocketCollectionManager.DeadChecker
extends TimerTask
implements PingResponseListener

DESCRIBE THE CLASS

Version:
$Id: SocketCollectionManager.java 3524 2007-01-09 14:09:27Z jeffh $
Author:
jeffh

Field Summary
protected  int numTries
           
protected  SourceRoute path
           
protected  int tries
           
 
Fields inherited from class rice.selector.TimerTask
cancelled, fixedRate, nextExecutionTime, period, seq
 
Constructor Summary
SocketCollectionManager.DeadChecker(SourceRoute path, int numTries, int initialDelay)
          Constructor for DeadChecker.
 
Method Summary
 boolean cancel()
           
 void pingResponse(SourceRoute path, long RTT, long timeHeardFrom)
          DESCRIBE THE METHOD
 void run()
          Main processing method for the DeadChecker object value of tries before run() is called:the time since ping was called:the time since deadchecker was started 1:500:500 2:1000:1500 3:2000:3500 4:4000:7500 5:8000:15500 // ~15 seconds to find 1 path faulty, using source routes gives us 30 seconds to find a node faulty
 java.lang.String toString()
           
 
Methods inherited from class rice.selector.TimerTask
compareTo, execute, isCancelled, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tries

protected int tries

numTries

protected int numTries

path

protected SourceRoute path
Constructor Detail

SocketCollectionManager.DeadChecker

public SocketCollectionManager.DeadChecker(SourceRoute path,
                                           int numTries,
                                           int initialDelay)
Constructor for DeadChecker.

Parameters:
address - DESCRIBE THE PARAMETER
numTries - DESCRIBE THE PARAMETER
mgr - DESCRIBE THE PARAMETER
Method Detail

pingResponse

public void pingResponse(SourceRoute path,
                         long RTT,
                         long timeHeardFrom)
DESCRIBE THE METHOD

Specified by:
pingResponse in interface PingResponseListener
Parameters:
address - DESCRIBE THE PARAMETER
RTT - DESCRIBE THE PARAMETER
timeHeardFrom - DESCRIBE THE PARAMETER

run

public void run()
Main processing method for the DeadChecker object value of tries before run() is called:the time since ping was called:the time since deadchecker was started 1:500:500 2:1000:1500 3:2000:3500 4:4000:7500 5:8000:15500 // ~15 seconds to find 1 path faulty, using source routes gives us 30 seconds to find a node faulty

Specified by:
run in interface CancellableTask
Specified by:
run in class TimerTask

cancel

public boolean cancel()
Specified by:
cancel in interface CancellableTask
Overrides:
cancel in class TimerTask
Returns:
true if it was cancelled, false if it was already complete, or cancelled.

toString

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

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection