InstanceStore Class

Represents an instance store.

Namespace:  System.Runtime.DurableInstancing
Assembly:  System.Runtime.DurableInstancing (in System.Runtime.DurableInstancing.dll)

public abstract class InstanceStore

The InstanceStore type exposes the following members.

  NameDescription
Protected methodInstanceStoreInitializes an instance of the InstanceStore class.
Top

  NameDescription
Public propertyDefaultInstanceOwnerGets or sets the default instance owner.
Top

  NameDescription
Public methodBeginExecuteAsynchronously executes persistence commands such as LoadWorkflowCommand and SaveWorkflowCommand.
Protected methodBeginTryCommandA persistence provider implements this method, which determines whether a particular persistence command can be executed. If the command can be executed, executes the command asynchronously.
Public methodBeginWaitForEventsBegins an asynchronous operation to listen for any events raised by the instance store for a specific instance handle.
Public methodCreateInstanceHandle()Creates an instance handle.
Public methodCreateInstanceHandle(Guid)Creates an instance handle. If the DefaultInstanceOwner is set, the value is automatically bound as the new handle’s instance owner. The instance identifier passed as a parameter is automatically bound as the new handle’s instance.
Public methodCreateInstanceHandle(InstanceOwner)Creates an instance handle. If the instance owner passed as a parameter is not null, the value is automatically bound as the new handle’s instance owner. (Otherwise, no instance owner is bound, even if DefaultInstanceOwner is set.)
Public methodCreateInstanceHandle(InstanceOwner, Guid)Creates an instance handle. If the instance owner passed as a parameter is not null, the value is automatically bound as the new handle’s instance owner. (Otherwise, no instance owner is bound, even if DefaultInstanceOwner is set.) The instance identifier passed as a parameter is automatically bound as the new handle’s instance.
Public methodEndExecuteEnds the asynchronous operation.
Protected methodEndTryCommandEnds an asynchronous operation.
Public methodEndWaitForEventsEnds the asynchronous operation initiated by the BeginWaitForEvents method.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodExecuteExecutes a persistence command synchronously. Examples of persistence commands are: LoadWorkflowCommand and SaveWorkflowCommand.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected methodGetEventsGets all the signaled events bound to an InstanceOwner object.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Protected methodGetInstanceOwnersGets each InstanceOwner object that is bound to a valid instance handle or has not been garbage collected.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnFreeInstanceHandleInvoked when an instance handle is freed.
Protected methodOnNewInstanceHandleInvoked when a new instance handle is created.
Protected methodResetEventResets the signaled event and removes the event from the signaled events list maintained by the instance owner.
Protected methodSignalEventAn instance store invokes this method to signal an event. A workflow host that subscribes for this persistence event receives it and takes an appropriate action.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Protected methodTryCommandA persistence provider implements this method, which determines whether a particular persistence command can be executed and if the command can be executed executes it asynchronously.
Public methodWaitForEventsA workflow host typically invokes this method to wait for an event to be signaled.
Top

A persistence provider provides access to an instance store through a concrete implementation of the InstanceStore class.

Persistence providers may call InstanceHandle.Free on handles passed to TryCommand, even after the command has finished executing. But persistence providers must not hold strong references to InstanceHandle or InstanceOwner objects, as this can prevent InstanceStore from being garbage collected.

Caution noteCaution

Workflow definitions for persisted workflows cannot be changed. If a workflow definition is changed after it is persisted, the workflow runtime will crash when the workflow is reloaded.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft