C# Class Shastra.Hydra.Messaging.Storage.NearestServerProvider

Use the Hydra server with the smallest response time. Switch if another one is more than Tolerance milliseconds faster.
Inheritance: PollingProviderBase
Afficher le fichier Open project: NorthNick/hydra

Méthodes publiques

Свойство Type Description
Tolerance long

Méthodes publiques

Méthode Description
NearestServerProvider ( IEnumerable stores ) : System.Collections.Generic

Initialise messaging. Must be called before any attempt to send or listen.

NearestServerProvider ( IEnumerable hydraServers, string database = null, int port = null ) : System.Collections.Generic

Initialise messaging. Must be called before any attempt to send or listen.

NearestServerProvider ( string hydraServer, string database = null, int port = null ) : System.Collections.Generic

Initialise messaging. Must be called before any attempt to send or listen.

Méthodes protégées

Méthode Description
InitDistance ( IEnumerable servers ) : void
OnDistanceInfo ( ServerDistanceInfo sdi ) : void

Method Details

InitDistance() protected méthode

protected InitDistance ( IEnumerable servers ) : void
servers IEnumerable
Résultat void

NearestServerProvider() public méthode

Initialise messaging. Must be called before any attempt to send or listen.
public NearestServerProvider ( IEnumerable stores ) : System.Collections.Generic
stores IEnumerable Hydra stores to communicate with
Résultat System.Collections.Generic

NearestServerProvider() public méthode

Initialise messaging. Must be called before any attempt to send or listen.
public NearestServerProvider ( IEnumerable hydraServers, string database = null, int port = null ) : System.Collections.Generic
hydraServers IEnumerable Hydra servers to communicate with
database string Name of the messaging database. Defaults to "hydra"
port int Port number of the messaging database. Defaults to 5984
Résultat System.Collections.Generic

NearestServerProvider() public méthode

Initialise messaging. Must be called before any attempt to send or listen.
public NearestServerProvider ( string hydraServer, string database = null, int port = null ) : System.Collections.Generic
hydraServer string Hydra server to communicate with
database string Name of the messaging database. Defaults to "hydra"
port int Port number of the messaging database. Defaults to 5984
Résultat System.Collections.Generic

OnDistanceInfo() protected méthode

protected OnDistanceInfo ( ServerDistanceInfo sdi ) : void
sdi ServerDistanceInfo
Résultat void

Property Details

Tolerance public_oe property

Only change servers if the distance is more than Tolerance milliseconds less than the distance to the current server.
public long Tolerance
Résultat long