Sdílet prostřednictvím


MetadataStore.GetSingleReplicaMetadata Method

When overridden in a derived class, gets the metadata for the single replica contained in the metadata store.

Namespace: Microsoft.Synchronization.MetadataStorage
Assembly: Microsoft.Synchronization.MetadataStorage (in microsoft.synchronization.metadatastorage.dll)

Syntax

'Declaration
Public MustOverride Function GetSingleReplicaMetadata As ReplicaMetadata
'Usage
Dim instance As MetadataStore
Dim returnValue As ReplicaMetadata

returnValue = instance.GetSingleReplicaMetadata
public abstract ReplicaMetadata GetSingleReplicaMetadata ()
public:
virtual ReplicaMetadata^ GetSingleReplicaMetadata () abstract
public abstract ReplicaMetadata GetSingleReplicaMetadata ()
public abstract function GetSingleReplicaMetadata () : ReplicaMetadata

Return Value

The metadata for the single replica contained in the metadata store.

Exceptions

Exception type Condition

MultipleReplicasInStoreException

The metadata store contains metadata for more than one replica.

ReplicaMetadataNotFoundException

Metadata does not exist for any replica in the metadata store.

MetadataStoreInvalidOperationException

The metadata store has not been opened. For example, OpenStore must be called to open the metadata store before this method can be called on a SqlMetadataStore object.

Remarks

A provider that represents a single replica can use this method to retrieve the metadata for the replica it represents. By using this method, the provider does not have to independently store the replica ID in order to retrieve the replica metadata.

See Also

Reference

MetadataStore Class
MetadataStore Members
Microsoft.Synchronization.MetadataStorage Namespace