InstancePersistenceContext InstancePersistenceContext InstancePersistenceContext InstancePersistenceContext Class

Definition

Represents execution state information while a persistence command is being executed.

public ref class InstancePersistenceContext sealed
public sealed class InstancePersistenceContext
type InstancePersistenceContext = class
Public NotInheritable Class InstancePersistenceContext
Inheritance
InstancePersistenceContextInstancePersistenceContextInstancePersistenceContextInstancePersistenceContext

Remarks

An instance of this class is passed to the TryCommand method of persistence provider implementations. Persistence providers use this class to inspect the in-memory view of the instance as well as indicate the results of operations on the external store which may affect the view or other in-memory context.

Properties

InstanceHandle InstanceHandle InstanceHandle InstanceHandle

Gets the current instance handle.

InstanceVersion InstanceVersion InstanceVersion InstanceVersion

Gets the version of the lock held on the current instance by the current instance handle.

InstanceView InstanceView InstanceView InstanceView

Gets the instance view object that represents the in-memory state of the current instance. This view reflects updates as they are made by the command in progress.

LockToken LockToken LockToken LockToken

Gets the lock token of the instance owner bound to the current instance handle.

UserContext UserContext UserContext UserContext

Gets the user context information attached to the current instance handle.

Methods

AssociatedInstanceKey(Guid) AssociatedInstanceKey(Guid) AssociatedInstanceKey(Guid) AssociatedInstanceKey(Guid)

Indicates that the persistence provider has successfully associated a key to the current instance in the instance store. The identifier of the key is specified as a parameter.

BeginBindReclaimedLock(Int64, TimeSpan, AsyncCallback, Object) BeginBindReclaimedLock(Int64, TimeSpan, AsyncCallback, Object) BeginBindReclaimedLock(Int64, TimeSpan, AsyncCallback, Object) BeginBindReclaimedLock(Int64, TimeSpan, AsyncCallback, Object)

Begin an asynchronous operation to bind an existing lock on an instance to the current instance handle. The version of the existing lock is passed as a parameter.

BeginExecute(InstancePersistenceCommand, TimeSpan, AsyncCallback, Object) BeginExecute(InstancePersistenceCommand, TimeSpan, AsyncCallback, Object) BeginExecute(InstancePersistenceCommand, TimeSpan, AsyncCallback, Object) BeginExecute(InstancePersistenceCommand, TimeSpan, AsyncCallback, Object)

Begins executing a persistence command asynchronously.

BindAcquiredLock(Int64) BindAcquiredLock(Int64) BindAcquiredLock(Int64) BindAcquiredLock(Int64)

Binds a newly acquired lock on an instance to the current instance handle. The version of the acquired lock is passed as a parameter.

BindEvent(InstancePersistenceEvent) BindEvent(InstancePersistenceEvent) BindEvent(InstancePersistenceEvent) BindEvent(InstancePersistenceEvent)

Binds an InstancePersistenceEvent to an instance handle.

BindInstance(Guid) BindInstance(Guid) BindInstance(Guid) BindInstance(Guid)

Binds an instance whose identifier is specified as a parameter to the current instance handle.

BindInstanceOwner(Guid, Guid) BindInstanceOwner(Guid, Guid) BindInstanceOwner(Guid, Guid) BindInstanceOwner(Guid, Guid)

Binds an instance owner to the current instance handle.

BindReclaimedLock(Int64, TimeSpan) BindReclaimedLock(Int64, TimeSpan) BindReclaimedLock(Int64, TimeSpan) BindReclaimedLock(Int64, TimeSpan)

Binds an existing lock on an instance to the current instance handle. The version of the existing lock is passed as a parameter.

CompletedInstance() CompletedInstance() CompletedInstance() CompletedInstance()

Indicates that the persistence provider has successfully marked the current instance as complete in the instance store.

CompletedInstanceKey(Guid) CompletedInstanceKey(Guid) CompletedInstanceKey(Guid) CompletedInstanceKey(Guid)

Indicates that the persistence provider has successfully marked a key as complete in the external store. The identifier of the key is specified as a parameter.

CreateBindReclaimedLockException(Int64) CreateBindReclaimedLockException(Int64) CreateBindReclaimedLockException(Int64) CreateBindReclaimedLockException(Int64)

Creates an instance of an exception which can be thrown from TryCommand to trigger BindReclaimedLock behavior.

EndBindReclaimedLock(IAsyncResult) EndBindReclaimedLock(IAsyncResult) EndBindReclaimedLock(IAsyncResult) EndBindReclaimedLock(IAsyncResult)

Ends the asynchronous operation started by the BeginBindReclaimedLock(Int64, TimeSpan, AsyncCallback, Object) method.

EndExecute(IAsyncResult) EndExecute(IAsyncResult) EndExecute(IAsyncResult) EndExecute(IAsyncResult)

Ends the asynchronous operation.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
Execute(InstancePersistenceCommand, TimeSpan) Execute(InstancePersistenceCommand, TimeSpan) Execute(InstancePersistenceCommand, TimeSpan) Execute(InstancePersistenceCommand, TimeSpan)

Executes a persistence command.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
LoadedInstance(InstanceState, IDictionary<XName,InstanceValue>, IDictionary<XName,InstanceValue>, IDictionary<Guid,IDictionary<XName,InstanceValue>>, IDictionary<Guid,IDictionary<XName,InstanceValue>>) LoadedInstance(InstanceState, IDictionary<XName,InstanceValue>, IDictionary<XName,InstanceValue>, IDictionary<Guid,IDictionary<XName,InstanceValue>>, IDictionary<Guid,IDictionary<XName,InstanceValue>>) LoadedInstance(InstanceState, IDictionary<XName,InstanceValue>, IDictionary<XName,InstanceValue>, IDictionary<Guid,IDictionary<XName,InstanceValue>>, IDictionary<Guid,IDictionary<XName,InstanceValue>>) LoadedInstance(InstanceState, IDictionary<XName,InstanceValue>, IDictionary<XName,InstanceValue>, IDictionary<Guid,IDictionary<XName,InstanceValue>>, IDictionary<Guid,IDictionary<XName,InstanceValue>>)

Indicates that the persistence provider has successfully retrieved the current instance from the instance store.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
PersistedInstance(IDictionary<XName,InstanceValue>) PersistedInstance(IDictionary<XName,InstanceValue>) PersistedInstance(IDictionary<XName,InstanceValue>) PersistedInstance(IDictionary<XName,InstanceValue>)

Indicates that the persistence provider has successfully persisted a set of instance data to the instance store. This has the effect of initializing the instance if it wasn't already.

QueriedInstanceStore(InstanceStoreQueryResult) QueriedInstanceStore(InstanceStoreQueryResult) QueriedInstanceStore(InstanceStoreQueryResult) QueriedInstanceStore(InstanceStoreQueryResult)

Adds the InstanceStoreQueryResult passed as a parameter to a list of InstanceStoreQueryResult objects in an InstanceView.

ReadInstanceKeyMetadata(Guid, IDictionary<XName,InstanceValue>, Boolean) ReadInstanceKeyMetadata(Guid, IDictionary<XName,InstanceValue>, Boolean) ReadInstanceKeyMetadata(Guid, IDictionary<XName,InstanceValue>, Boolean) ReadInstanceKeyMetadata(Guid, IDictionary<XName,InstanceValue>, Boolean)

Indicates that the persistence provider has successfully read some instance key metadata for a key associated to the current instance from the instance store.

ReadInstanceMetadata(IDictionary<XName,InstanceValue>, Boolean) ReadInstanceMetadata(IDictionary<XName,InstanceValue>, Boolean) ReadInstanceMetadata(IDictionary<XName,InstanceValue>, Boolean) ReadInstanceMetadata(IDictionary<XName,InstanceValue>, Boolean)

Indicates that the persistence provider has successfully read some instance metadata for the current instance from the instance store.

ReadInstanceOwnerMetadata(IDictionary<XName,InstanceValue>, Boolean) ReadInstanceOwnerMetadata(IDictionary<XName,InstanceValue>, Boolean) ReadInstanceOwnerMetadata(IDictionary<XName,InstanceValue>, Boolean) ReadInstanceOwnerMetadata(IDictionary<XName,InstanceValue>, Boolean)

Sets the instance owner metadata using the data passed in the parameter.

SetCancellationHandler(Action<InstancePersistenceContext>) SetCancellationHandler(Action<InstancePersistenceContext>) SetCancellationHandler(Action<InstancePersistenceContext>) SetCancellationHandler(Action<InstancePersistenceContext>)

Sets the cancellation handler to be called when the cancel of an operation is requested.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
UnassociatedInstanceKey(Guid) UnassociatedInstanceKey(Guid) UnassociatedInstanceKey(Guid) UnassociatedInstanceKey(Guid)

Indicates that the persistence provider has successfully disassociated a key from the current instance in the instance store. The identifier of the key is specified as a parameter.

WroteInstanceKeyMetadataValue(Guid, XName, InstanceValue) WroteInstanceKeyMetadataValue(Guid, XName, InstanceValue) WroteInstanceKeyMetadataValue(Guid, XName, InstanceValue) WroteInstanceKeyMetadataValue(Guid, XName, InstanceValue)

Indicates that the persistence provider has successfully written a metadata value for an instance key that is associated with the current instance to the instance store

WroteInstanceMetadataValue(XName, InstanceValue) WroteInstanceMetadataValue(XName, InstanceValue) WroteInstanceMetadataValue(XName, InstanceValue) WroteInstanceMetadataValue(XName, InstanceValue)

Indicates that the persistence provider has successfully written a metadata value for the current instance to the external instance store.

WroteInstanceOwnerMetadataValue(XName, InstanceValue) WroteInstanceOwnerMetadataValue(XName, InstanceValue) WroteInstanceOwnerMetadataValue(XName, InstanceValue) WroteInstanceOwnerMetadataValue(XName, InstanceValue)

Indicates that the persistence provider has successfully written a metadata value for the current instance owner to the instance store.

Applies to