你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

system.fabric

Classes

CancellationToken

A CancellationToken is used to propagate notification that operations should be canceled. You create a cancellation token by instantiating a CancellationTokenSource object, which manages cancellation tokens retrieved from its getToken() method. You then pass the cancellation token to any number of operations that should receive notice of cancellation. The token cannot be used to initiate cancellation. When the owning object calls cancel(), the cancelled property on the cancellation token is set to true. The objects that receive the notification can respond in whatever manner is appropriate.

CancellationTokenSource

A CancellationTokenSource is used to create CancellationToken object and manage it.

ClaimsCredentials

Represents the claim based security credential acquired from STS (security token service).

CodePackage

Represents the code package definition.

ConfigurationPackage

Represents a configuration package.

DataPackage

Defines a data package of an application.

EncryptionUtility

Utility class to perform encryption and decryption operations.

Epoch

Represents the current version of the partition in Service Fabric.

Remarks:An Epoch is a configuration number for the partition as a whole. When the configuration of the replica set changes, for example when the Primary replica changes, the operations that are replicated from the new Primary replica are said to be a new Epoch from the ones which were sent by the old Primary replica. The fact that the Primary has changed is not directly visible to Secondary replicas, which are usually unaffected by the failure that affected the original Primary replica. To track that the Primary replica has changed has to be communicated to the Secondary replica. This communication occurs via the updateEpochAsync(Epoch epoch, SequenceNumber previousEpochLastSequenceNumber, CancellationToken cancellationToken) method. Most services can ignore the details of the inner fields of the Epoch as it is usually sufficient to know that the Epoch has changed and to compare Epochs to determine relative ordering of operations and events in the system. Comparison operations are provided for this purpose.

FabricClient

Client for a Service Fabric cluster.

Remarks:It is highly recommended that you share FabricClients as much as possible. This is because the FabricClient has multiple optimizations such as caching and batching that you would not be able to fully utilize otherwise.

FabricClientSettings

Represents the configuration settings for the FabricClient class.

FabricCodePackageActivationContext

Represents activation context for the Service Fabric service. This is valid for fabric activated service only.

FabricReplicator

Replicates state for high availability and reliability.

Remarks:Provides the default implementation of the StateReplicator, Replicator, and PrimaryReplicator interfaces, which user services can use, along with their implementation of the StateProvider interface. An instance of the system.fabric.FabricReplicator class is obtained via the createReplicator(StateProvider stateProvider, ReplicatorSettings replicatorSettings) method, which can be cast to StateReplicator for use.

FabricRuntime

Allows user created hosts to obtain their CodePackageActivationContext, well as to register the necessary service factories [ StatelessServiceFactory, StatefulServiceFactory ] or service types directly.

GatewayInformation

Contains information identifying a Service Fabric node in the cluster.

Int64RangePartitionInformation

Represents the Information for Partition

LoadMetric
NamedPartitionInformation

Describes the partition information for the name as a string that is based on partition schemes. Services observe this type of ServicePartitionInformation when the service is created with the system.fabric.NamedPartitionInformation derives from the ServicePartition interface and is provided to services as part of the StatefulServicePartition or StatelessServicePartition interface, which is passed in during the stateful openAsync(ReplicaOpenMode openMode, StatefulServicePartition partition, CancellationToken cancellationToken) or the stateless openAsync(StatelessServicePartition partition, CancellationToken cancellationToken).

NodeContext

Class to encapsulate a node context.

NodeId

Class to encapsulate a node ID

NoneSecurityCredentials

SecurityCredentials subtype for non-secure mode.

Observable<T>

This class represents an observable object

OperationData
PackageAddedEventArgs<T>

Describes a package added event.

PackageModifiedEventArgs<T>

Describes a package modified event.

PackageRemovedEventArgs<T>

Describes a package removed event.

PackageSharingPolicy

Represents a policy for the package sharing.

PackageSharingPolicyList

Represents a list of PackageSharingPolicy objects.

ReplicaInformation

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

ReplicaSetConfiguration

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

ReplicatorSettings
ResolvedServiceEndpoint

Represents a resolved service endpoint, which contains information about service partition replica role and the address it listens to.

ResolvedServicePartition

Represents a data structure that contains information on the partitioning and set of endpoints to which the specified Service partition listens.

SecurityCredentials

An abstract base class for types that represent security credentials.

SequenceNumber

Long, represents the last sequence number (LSN) of the operation.

ServiceContext

Represents the service context that the service is operating under.

ServiceInitializationParameters

Remarks:Derived types define initialization data that are specific to stateless and stateful services.

ServicePartitionInformation

Represents the base class for describing partitions.

Remarks:

Int64RangePartitionInformation, NamedPartitionInformation, and SingletonPartitionInformation all derive from this type.

SingletonPartitionInformation

Indicates that the service is Singleton-partitioned, effectively non-partitioned or with one partition only, and uses the partition scheme of a Singleton service.

StatefulServiceContext

Represents the service context that the stateful service is operating under.

StatefulServiceFailoverSettings
StatefulServiceInitializationParameters

Defines service initialization parameters for a stateful service.

StatelessServiceInitializationParameters

Defines service initialization parameters for a stateless service.

WindowsCredentials

Represents the active directory domain credential.

X509Credentials

Specifies the security credentials that are based upon X.509 certificates which are located in Windows certificate store.

X509Credentials2

Specifies the security credentials that are based upon X.509 certificates which are specified using the certificate path.

X509Name

A type to identify X509 certificate with subject common name or DNS name.

Interfaces

CodePackageActivationContext

Represents activation context for the Service Fabric service. This is valid for fabric activated service only.

Observer<U>

A class can implement the Observer interface when it wants to be informed of changes in observable objects.

Operation

Remarks:

system.fabric.Operation is the base interface that describes state changes that are delivered to a Secondary replica. They contain the replicateAsync(OperationData operationData, SequenceNumber sequenceNumber, CancellationToken cancellationToken) and the sequence number and other identifying information.

OperationDataStream

An system.fabric.OperationDataStream encapsulates a stream of OperationData objects that are exchanged between Primary replica and Secondary replica. Objects that implement system.fabric.OperationDataStream are used during the copy process. Both the copy context getCopyContext() method that is sent from the Secondary replica to the Primary replica and the copy state getCopyState(SequenceNumber upToSequenceNumber, OperationDataStream copyContext) method implement the system.fabric.OperationDataStream interface.

OperationStream

Represents a stream of replication or copy operations that are sent from the Primary to the Secondary replica.

Remarks: The streams returned from getCopyStream() and getReplicationStream() are objects that implement system.fabric.OperationStream.

OperationStream2

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

PrimaryReplicator

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Replicator

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

ServicePartition

Provides information to the service about the partition to which it belongs and provides methods for the service to interact with the system during runtime.

StatefulServiceFactory

Represents a stateful service factory that is responsible for creating replicas of a specific type of stateful service. Stateful service factories are registered with the FabricRuntime by service hosts via system.fabric.FabricRuntime#registerStatefulServiceFactory(java.lang.String,system.fabric.StatefulServiceFactory) or system.fabric.FabricRuntime#registerStatefulServiceFactoryAsync(java.lang.String,system.fabric.StatefulServiceFactory,java.time.Duration)

StatefulServicePartition
StatefulServiceReplica

Defines behavior that governs the lifecycle of a replica, such as startup, initialization, role changes, and shutdown.

Remarks:Stateful service types must implement this interface. The logic of a stateful service type includes behavior that is invoked on Primary replicas and behavior that is invoked on Secondary replicas. If the service author wants to make use of the provided FabricReplicator, then the service must also implement StateProvider to use the implementation of StateReplicator that is provided by FabricReplicator

StatelessServiceFactory

Represents a stateless service factory that is responsible for creating instances of a specific type of stateless service.

Remarks:Stateless service factories are registered with the FabricRuntime by service hosts via system.fabric.FabricRuntime#registerStatelessServiceFactory(java.lang.String,system.fabric.StatelessServiceFactory) or system.fabric.FabricRuntime#registerStatelessServiceFactoryAsync(java.lang.String,system.fabric.StatelessServiceFactory,java.time.Duration)

StatelessServiceInstance

Stateless services are those which have no state that requires management by Service Fabric. Stateless service types must implement this interface.

StatelessServicePartition

Represents a partition that is associated with a stateless service instance.

Remarks:Provided to a stateless service as a parameter to the ServicePartition.

StateProvider

Defines the behavior that a service must implement to interact with the FabricReplicator.

StateReplicator

Exposes replication related functions of the FabricReplicator class that are used by StateProvider to replicate state to ensure high availability.

StateReplicator2

Exposes replication-related functions of the FabricReplicator class that are used by StateProvider to replicate state to ensure high availability.

Enums

CredentialType
FabricClientRole

Represents the fabric client security role.

FabricErrorCode
FaultType

Indicates the type of fault that a service reports: invalid, transient or permanent.

Remarks : Services can report faults during runtime by using the reportFault(FaultType faultType) method to indicate the type of fault.

MoveCost
OperationType

Specifies the type of operation that is received via the copy or replication stream.

PackageSharingPolicyScope

Represents the scope for the PackageSharingPolicy

PartitionAccessStatus

Enumerates the access status of the partition.

Remarks:

system.fabric.PartitionAccessStatus is used to check that a read or write operation is allowed. When service replicas handle a client request, they should verify that the system is in a state that allows processing. By checking the getReadStatus() or getwriteStatus() as appropriate, the replica can be notified of conditions that prevent correct operation. Note that write operations might still see an exception from the replicator for one of these conditions, because the condition might change between the getwriteStatus() check and the call to replicateAsync(OperationData operationData, SequenceNumber sequenceNumber, CancellationToken cancellationToken).

ProtectionLevel

Enumerates how communication is protected.

ReplicaOpenMode

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

ReplicaRole

Indicates the role of a stateful service replica.

Remarks:Service Fabric requires different behaviors from a service replica depending on what role it currently performs.

ReplicaSetQuorumMode

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

ReplicaStatus
ServiceEndpointRole

Enumerates the kinds of possible roles of a service endpoint.

ServicePartitionKind

Indicates the type of partitioning scheme that is used.

Remarks:

system.fabric.ServicePartitionKind defines the value of the kind property of the ServicePartitionInformation class.

X509FindType

Specifies the type of value the getFindType() method searches for.

X509StoreLocation

Defines a class to represent a store location in the certificate provider.