FabricClient FabricClient FabricClient Class

Definition

Creates and manages Service Fabric services and other entities.

public sealed class FabricClient : IDisposable
type FabricClient = class
    interface IDisposable
Public NotInheritable Class FabricClient
Implements IDisposable
Inheritance
FabricClientFabricClientFabricClient
Implements

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.

Constructors

FabricClient() FabricClient() FabricClient()

Initializes a new instance of the FabricClient class. This constructor should be used by code that is running inside the cluster. It allows the FabricClient instance to connect to the cluster via the local Gateway service running on the same node.

FabricClient(FabricClientRole) FabricClient(FabricClientRole) FabricClient(FabricClientRole)

Initializes a new instance of the FabricClient class with the specified fabric client role - FabricClientRole.

FabricClient(FabricClientSettings) FabricClient(FabricClientSettings) FabricClient(FabricClientSettings)

Initializes a new instance of the FabricClient class with the desired FabricClientSettings. If the FabricClient is on the same cluster as the service, then use a Local FabricClient. Local FabricClient is a feature of Service Fabric that allows the FabricClient to connect to the local Gateway Service instead of choosing from a list. This way, your client can bypass an extra network hop. In case a service is resolving another service partition in the same cluster, then it is recommended that you use Local FabricClient, as it enables automatic load balancing and improves performance.

FabricClient(String[]) FabricClient(String[]) FabricClient(String[])

Initializes a new instance of the FabricClient class with given Service Fabric Gateway addresses. These host-endpoints are list of ':' delimited strings where the first part is the ip of the cluster and the second part is the client-connection endpoint-port.

FabricClient(FabricClientSettings, String[]) FabricClient(FabricClientSettings, String[]) FabricClient(FabricClientSettings, String[])

Initializes a new instance of the FabricClient class with given Service Fabric Gateway addresses and the desired FabricClientSettings.

FabricClient(SecurityCredentials, String[]) FabricClient(SecurityCredentials, String[]) FabricClient(SecurityCredentials, String[])

Initializes a new instance of the FabricClient class with given Service Fabric Gateway addresses and SecurityCredentials.

FabricClient(TimeSpan, String[]) FabricClient(TimeSpan, String[]) FabricClient(TimeSpan, String[])

DEPRECATED. Initializes a new instance of the FabricClient class with given keepAliveInterval and Service Fabric Gateway addresses (hostEndpoints).

FabricClient(SecurityCredentials, FabricClientSettings, String[]) FabricClient(SecurityCredentials, FabricClientSettings, String[]) FabricClient(SecurityCredentials, FabricClientSettings, String[])

Initializes a new instance of the FabricClient class with given Service Fabric Gateway addresses, SecurityCredentials and FabricClientSettings.

FabricClient(SecurityCredentials, TimeSpan, String[]) FabricClient(SecurityCredentials, TimeSpan, String[]) FabricClient(SecurityCredentials, TimeSpan, String[])

DEPRECATED. Initializes a new instance of the FabricClient class with given credentials, keepAliveInterval and Service Fabric Gateway addresses (hostEndpoints).

Fields

FabricSystemApplication FabricSystemApplication FabricSystemApplication

The Service Fabric System application.

Properties

ApplicationManager ApplicationManager ApplicationManager

Gets the ApplicationManager that can be used to perform operations related to applications and application types.

ClusterManager ClusterManager ClusterManager

Gets the ClusterManager that can be used to perform operations related to the Service Fabric cluster.

ComposeDeploymentManager ComposeDeploymentManager ComposeDeploymentManager

Gets the FabricClient.ComposeDeploymentClient that can be used to perform operations related to compose deployment.

FaultManager FaultManager FaultManager

Gets the FabricClient.FaultManagementClient to induce faults. For example, RestartNodeAsync.

HealthManager HealthManager HealthManager

Gets the health client that can be used to perform health related operations, like report health or get entity health.

InfrastructureManager InfrastructureManager InfrastructureManager

Gets the FabricClient.InfrastructureServiceClient that can be used to perform operations related to the infrastructure on which the cluster is running.

This property supports the Service Fabric platform; it is not meant to be called directly from your code.

NetworkManager NetworkManager NetworkManager

Gets the FabricClient.NetworkManagementClient to manage container networks.

PropertyManager PropertyManager PropertyManager

Gets the PropertyManager that can be used to perform operations related to names and properties.

QueryManager QueryManager QueryManager

Gets the query manager that can be used to execute queries against the Service Fabric cluster.

RepairManager RepairManager RepairManager

Gets the FabricClient.RepairManagementClient that can be used to manage repair tasks.

This property supports the Service Fabric platform; it is not meant to be called directly from your code.

ServiceGroupManager ServiceGroupManager ServiceGroupManager

Gets the ServiceGroupManager that can be used to perform operations related to service groups.

ServiceManager ServiceManager ServiceManager

Gets the ServiceManager that can be used to perform operations related to services and service types.

Settings Settings Settings

Gets the fabric client settings.

TestManager TestManager TestManager

Gets the FabricClient.TestManagementClient to perform complex actions that go through FaultAnalysisService. For example, StartPartitionDataLossAsync. This also supports APIs for validation (that do not go through FaultAnalysisService). For example, ValidateServiceAsync.

Methods

Dispose() Dispose() Dispose()

Disposes of the fabric client.

Finalize() Finalize() Finalize()

Destructor of fabric client.

UpdateSecurityCredentials(SecurityCredentials) UpdateSecurityCredentials(SecurityCredentials) UpdateSecurityCredentials(SecurityCredentials)

Updates the fabric client security credentials.

UpdateSettings(FabricClientSettings) UpdateSettings(FabricClientSettings) UpdateSettings(FabricClientSettings)

Updates the fabric client settings.

Events

ClaimsRetrieval ClaimsRetrieval ClaimsRetrieval

Occurs when the client needs to provide a claims token for authorization with the gateway

ClientConnected ClientConnected ClientConnected

Occurs when the client is connected to gateway.

ClientDisconnected ClientDisconnected ClientDisconnected

Occurs when the client is disconnected from the gateway.

Extension Methods

IsDefined(Object) IsDefined(Object) IsDefined(Object)

Determines if a certain property is defined or not.

IsNull(Object) IsNull(Object) IsNull(Object)

Determines if a certain property is null or not.

IsPrimitive(Object) IsPrimitive(Object) IsPrimitive(Object)

Determines if a certain property is of premitive JSON type.

Applies to