C# Класс Shastra.Hydra.Messaging.Storage.NearestServerProvider

Use the Hydra server with the smallest response time. Switch if another one is more than Tolerance milliseconds faster.
Наследование: PollingProviderBase
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
Tolerance long

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
InitDistance ( IEnumerable servers ) : void
OnDistanceInfo ( ServerDistanceInfo sdi ) : void

Описание методов

InitDistance() защищенный Метод

protected InitDistance ( IEnumerable servers ) : void
servers IEnumerable
Результат void

NearestServerProvider() публичный Метод

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
Результат System.Collections.Generic

NearestServerProvider() публичный Метод

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
Результат System.Collections.Generic

NearestServerProvider() публичный Метод

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
Результат System.Collections.Generic

OnDistanceInfo() защищенный Метод

protected OnDistanceInfo ( ServerDistanceInfo sdi ) : void
sdi ServerDistanceInfo
Результат void

Описание свойств

Tolerance публичное свойство

Only change servers if the distance is more than Tolerance milliseconds less than the distance to the current server.
public long Tolerance
Результат long