Class DatabaseServerMessenger
An IServerMessenger that works by storing messages in the database.
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public class DatabaseServerMessenger : ServerMessengerBase, IServerMessenger
Constructors
DatabaseServerMessenger(ApplicationContext, Boolean, DatabaseServerMessengerOptions)
Declaration
public DatabaseServerMessenger(ApplicationContext appContext, bool distributedEnabled, DatabaseServerMessengerOptions options)
Parameters
Type | Name | Description |
---|---|---|
ApplicationContext | appContext | |
System.Boolean | distributedEnabled | |
DatabaseServerMessengerOptions | options |
Fields
LocalIdentity
Gets the unique local identity of the executing AppDomain.
Declaration
protected static readonly string LocalIdentity
Field Value
Type | Description |
---|---|
System.String |
Remarks
It is not only about the "server" (machine name and appDomainappId), but also about an AppDomain, within a Process, on that server - because two AppDomains running at the same time on the same server (eg during a restart) are, practically, a LB setup.
Practically, all we really need is the guid, the other infos are here for information and debugging purposes.
Properties
ApplicationContext
Declaration
protected ApplicationContext ApplicationContext { get; }
Property Value
Type | Description |
---|---|
ApplicationContext |
Options
Declaration
protected DatabaseServerMessengerOptions Options { get; }
Property Value
Type | Description |
---|---|
DatabaseServerMessengerOptions |
Methods
Boot()
Boots the messenger.
Declaration
protected void Boot()
Remarks
Thread safety: this is NOT thread safe. Because it is NOT meant to run multi-threaded. Callers MUST ensure thread-safety.
DeliverRemote(IEnumerable<IServerAddress>, ICacheRefresher, MessageType, IEnumerable<Object>, String)
Declaration
protected override void DeliverRemote(IEnumerable<IServerAddress> servers, ICacheRefresher refresher, MessageType messageType, IEnumerable<object> ids = null, string json = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IServerAddress> | servers | |
umbraco.interfaces.ICacheRefresher | refresher | |
MessageType | messageType | |
System.Collections.Generic.IEnumerable<System.Object> | ids | |
System.String | json |
RequiresDistributed(IEnumerable<IServerAddress>, ICacheRefresher, MessageType)
Declaration
protected override bool RequiresDistributed(IEnumerable<IServerAddress> servers, ICacheRefresher refresher, MessageType dispatchType)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IServerAddress> | servers | |
umbraco.interfaces.ICacheRefresher | refresher | |
MessageType | dispatchType |
Returns
Type | Description |
---|---|
System.Boolean |
Sync()
Synchronize the server (throttled).
Declaration
protected void Sync()