Class ServerStateService
Service that sends and collect state information to and from the other servers using the Event system.
Inheritance
Implements
Namespace: EPiServer.Events.Clients.Internal
Assembly: EPiServer.Events.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class ServerStateService : Object, IDisposable
Constructors
ServerStateService(IEventRegistry, IEventBroker, IEventHostingEnvironment, ServiceAccessor<ITimer>)
Initializes a new instance of the Server
Declaration
public ServerStateService(IEventRegistry eventService, IEventBroker eventBroker, IEventHostingEnvironment hostingEnvironment, ServiceAccessor<ITimer> timerFactory)
Parameters
Type | Name | Description |
---|---|---|
IEvent |
eventService | The IEvent |
IEvent |
eventBroker | The IEvent |
IEvent |
hostingEnvironment | The current hosting environment used by this instance. |
Service |
timerFactory | A factory that creates the timer that should be used by the service. |
Exceptions
Type | Condition |
---|---|
System. |
eventService or eventBroker |
Properties
LocalState
Represents the state of the local server
Declaration
public virtual ServerState LocalState { get; }
Property Value
Type | Description |
---|---|
Server |
Methods
CurrentServerState()
Gets an enumerable of the current server state as known by this Server
Declaration
public virtual IEnumerable<ServerState> CurrentServerState()
Returns
Type | Description |
---|---|
System. |
An enumerable of Server |
Dispose()
Declaration
public void Dispose()
Initialize()
Initializes this Server
Declaration
public void Initialize()
RequestState()
Sends a state request to all currently participating servers.
Declaration
public virtual void RequestState()
Uninitialize()
Uninitializes this Server
Declaration
public void Uninitialize()
Events
StateMessageReceived
Occurs when a state message is received.
Declaration
public event EventHandler<StateMessageEventArgs> StateMessageReceived
Event Type
Type | Description |
---|---|
System. |