November Happy Hour will be moved to Thursday December 5th.

Class ServerStateService

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Service that sends and collect state information to and from the other servers using the Event system.

Inheritance
System.Object
ServerStateService
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Events.Clients.Internal
Assembly: EPiServer.Events.dll
Version: 11.20.7
Syntax
[ServiceConfiguration(typeof(ServerStateService), Lifecycle = ServiceInstanceScope.Singleton)]
public class ServerStateService : IDisposable

Constructors

ServerStateService(IEventRegistry, IEventBroker, IEventHostingEnvironment, ServiceAccessor<ITimer>)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the ServerStateService class.

Declaration
public ServerStateService(IEventRegistry eventService, IEventBroker eventBroker, IEventHostingEnvironment hostingEnvironment, ServiceAccessor<ITimer> timerFactory)
Parameters
Type Name Description
IEventRegistry eventService

The IEventRegistry instance that should be used by this instance.

IEventBroker eventBroker

The IEventBroker instance that should be used by this instance.

IEventHostingEnvironment hostingEnvironment

The current hosting environment used by this instance.

ServiceAccessor<ITimer> timerFactory

A factory that creates the timer that should be used by the service.

Exceptions
Type Condition
System.ArgumentNullException

eventService or eventBroker

Properties

LocalState

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Represents the state of the local server

Declaration
public virtual ServerState LocalState { get; }
Property Value
Type Description
ServerState

Methods

CurrentServerState()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets an enumerable of the current server state as known by this ServerStateService instance.

Declaration
public virtual IEnumerable<ServerState> CurrentServerState()
Returns
Type Description
System.Collections.Generic.IEnumerable<ServerState>

An enumerable of ServerState instances for all server that has sent events to the current instance.

Dispose()

Declaration
public void Dispose()

Initialize()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes this ServerStateService instance and broadcasts a startup state message.

Declaration
public void Initialize()

RequestState()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Sends a state request to all currently participating servers.

Declaration
public virtual void RequestState()

Uninitialize()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Uninitializes this ServerStateService instance and broadcasts a shutdown state message.

Declaration
public void Uninitialize()

Events

StateMessageReceived

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Occurs when a state message is received.

Declaration
public event EventHandler<StateMessageEventArgs> StateMessageReceived
Event Type
Type Description
System.EventHandler<StateMessageEventArgs>

Implements

System.IDisposable

Extension Methods