C# Class Brunet.Applications.Tests.NetworkTest

Tests networking conditions across the overlay.
Afficher le fichier Open project: pstjuste/brunet

Protected Properties

Свойство Type Description
_current_iter int
_db_con string
_fe FuzzyEvent
_node Brunet.Symphony.StructuredNode
_outstanding bool>.Dictionary
_results ResultState>.Dictionary
_running int
_sync object

Méthodes publiques

Méthode Description
GetAddress ( Address addr ) : string

Returns the unique part of an address

NetworkTest ( StructuredNode node ) : Brunet.Concurrent
Stop ( ) : void

Stops the running of the job, node disconnection also calls it.

Méthodes protégées

Méthode Description
Finished ( ) : void

The test is finished, write the results to the DB

InitializeDatabase ( ) : int

Creates the database if necessary and returns the current iteration.

Invoke ( Address addr ) : void

Starts a test on the specified node.

ProcessResults ( Address addr, RpcResult result ) : void

Process a new results and determine whether or not to execute more tests on this node and the neighbors it returned.

Run ( System.DateTime now ) : void

Begin a test if there isn't already one running

Stop ( System.Data.Node n, System.Data.Node cs ) : void

Called when the Node changes state, stops the Test if necessary.

Method Details

Finished() protected méthode

The test is finished, write the results to the DB
protected Finished ( ) : void
Résultat void

GetAddress() public static méthode

Returns the unique part of an address
public static GetAddress ( Address addr ) : string
addr Address
Résultat string

InitializeDatabase() protected méthode

Creates the database if necessary and returns the current iteration.
protected InitializeDatabase ( ) : int
Résultat int

Invoke() protected méthode

Starts a test on the specified node.
protected Invoke ( Address addr ) : void
addr Address
Résultat void

NetworkTest() public méthode

public NetworkTest ( StructuredNode node ) : Brunet.Concurrent
node Brunet.Symphony.StructuredNode
Résultat Brunet.Concurrent

ProcessResults() protected méthode

Process a new results and determine whether or not to execute more tests on this node and the neighbors it returned.
protected ProcessResults ( Address addr, RpcResult result ) : void
addr Address
result Brunet.Messaging.RpcResult
Résultat void

Run() protected méthode

Begin a test if there isn't already one running
protected Run ( System.DateTime now ) : void
now System.DateTime
Résultat void

Stop() public méthode

Stops the running of the job, node disconnection also calls it.
public Stop ( ) : void
Résultat void

Stop() protected méthode

Called when the Node changes state, stops the Test if necessary.
protected Stop ( System.Data.Node n, System.Data.Node cs ) : void
n System.Data.Node
cs System.Data.Node
Résultat void

Property Details

_current_iter protected_oe property

The current iteration of the test
protected int _current_iter
Résultat int

_db_con protected_oe property

The string used to connedct to the DB
protected string _db_con
Résultat string

_fe protected_oe property

Timer to instigate running of the test
protected FuzzyEvent _fe
Résultat FuzzyEvent

_node protected_oe property

The Node the test is being performed for
protected StructuredNode,Brunet.Symphony _node
Résultat Brunet.Symphony.StructuredNode

_outstanding protected_oe property

The outstanding ResultStates
protected Dictionary _outstanding
Résultat bool>.Dictionary

_results protected_oe property

Maps a Node to a ResultState
protected Dictionary _results
Résultat ResultState>.Dictionary

_running protected_oe property

The tests is currently active
protected int _running
Résultat int

_sync protected_oe property

Thread-safety for the _outstanding and _results
protected object _sync
Résultat object