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
파일 보기 프로젝트 열기: NorthNick/hydra

공개 프로퍼티들

프로퍼티 타입 설명
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