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

Inheritance: IProvider, IDisposable
Exibir arquivo Open project: NorthNick/hydra

Protected Properties

Property Type Description
Distances ServerDistance
StoreDict IStore>.Dictionary

Public Methods

Method Description
Dispose ( ) : void
GetStore ( bool waitForInitialisation ) : IStore

Fetches the current store to use for polling.

ServerError ( string server ) : void

Called by listener or sender when they cannot contact a server.

Protected Methods

Method Description
Dispose ( bool disposing ) : void
FinishedInitialisation ( ) : void
InitDistance ( IEnumerable servers ) : void
MeasureDistance ( string server ) : ServerDistanceInfo
OnDistanceInfo ( ServerDistanceInfo sdi ) : void
PollingProviderBase ( IEnumerable stores ) : System

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

PollingProviderBase ( IEnumerable hydraServers, string database = null, int port = null ) : System

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

PollingProviderBase ( string hydraServer, string database = null, int port = null ) : System

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

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

FinishedInitialisation() protected method

protected FinishedInitialisation ( ) : void
return void

GetStore() public method

Fetches the current store to use for polling.
public GetStore ( bool waitForInitialisation ) : IStore
waitForInitialisation bool Whether to block until the IProvider is fully initialised
return IStore

InitDistance() protected method

protected InitDistance ( IEnumerable servers ) : void
servers IEnumerable
return void

MeasureDistance() protected method

protected MeasureDistance ( string server ) : ServerDistanceInfo
server string
return ServerDistanceInfo

OnDistanceInfo() protected method

protected OnDistanceInfo ( ServerDistanceInfo sdi ) : void
sdi ServerDistanceInfo
return void

PollingProviderBase() protected method

Initialise messaging. Must be called before any attempt to send or listen.
protected PollingProviderBase ( IEnumerable stores ) : System
stores IEnumerable Hydra stores to communicate with
return System

PollingProviderBase() protected method

Initialise messaging. Must be called before any attempt to send or listen.
protected PollingProviderBase ( IEnumerable hydraServers, string database = null, int port = null ) : System
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
return System

PollingProviderBase() protected method

Initialise messaging. Must be called before any attempt to send or listen.
protected PollingProviderBase ( string hydraServer, string database = null, int port = null ) : System
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
return System

ServerError() public method

Called by listener or sender when they cannot contact a server.
public ServerError ( string server ) : void
server string The server that could not be contacted
return void

Property Details

Distances protected_oe property

protected ServerDistance Distances
return ServerDistance

StoreDict protected_oe property

protected Dictionary StoreDict
return IStore>.Dictionary