FabricServicePartitionClient<C> Class
- java.
lang. Object - ServicePartitionClient<TCommunicationClient>
- microsoft.
servicefabric. services. communication. client. FabricServicePartitionClient<C>
- microsoft.
Type Parameters
- C
type of Communication client
public class FabricServicePartitionClient implements ServicePartitionClient
Specifies an instance of the communication client that can communicate with the replicas of a particular partition.
Constructor Summary
Constructor | Description |
---|---|
FabricServicePartitionClient(CommunicationClientFactory<C> factory, URI serviceName) |
Instantiates a service partition client that uses the specified communication client factory to create a client to talk to the service endpoint identified by the service uri argument. |
FabricServicePartitionClient(CommunicationClientFactory<C> factory, URI serviceName, ServicePartitionKey partitionKey) |
Instantiates a service partition client that uses the specified communication client factory to create a client to talk to the service endpoint identified by the service uri, partitionkey arguments. |
FabricServicePartitionClient(CommunicationClientFactory<C> factory, URI serviceName, ServicePartitionKey partitionKey, TargetReplicaSelector targetReplicaSelector) |
Instantiates a service partition client that uses the specified communication client factory to create a client to talk to the service endpoint identified by the service uri, partitionkey and replica selector arguments. |
FabricServicePartitionClient(CommunicationClientFactory<C> factory, URI serviceName, ServicePartitionKey partitionKey, TargetReplicaSelector targetReplicaSelector, String listenerName) |
Instantiates a service partition client that uses the specified communication client factory to create a client to talk to the service endpoint identified by the service uri, partitionkey, replica and listener arguments. |
FabricServicePartitionClient(CommunicationClientFactory<C> factory, URI serviceName, ServicePartitionKey partitionKey, TargetReplicaSelector targetReplicaSelector, String listenerName, OperationRetrySettings retrySettings) |
Instantiates a service partition client that uses the specified communication client factory to create a client to talk to the service endpoint identified by the service uri, partitionkey, replica and listener arguments. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Communication |
getCommunicationClientFactory()
Gets the communication client factory |
Resolved |
getLastResolvedServicePartition()
Gets the resolved service partition that was set on the client. |
String |
getListenerName()
Gets the name of the listener in the replica to which the client should connect to. |
Service |
getPartitionKey()
Gets the partition key. |
URI |
getServiceUri()
Gets the name of the service |
Target |
getTargetReplicaSelector()
Gets the information about which replica in the partition the client should connect to. |
<T> CompletableFuture<T> |
invokeWithRetryAsync(Function<C, CompletableFuture<T>> func, CancellationToken cancellationToken, Class<?>... doNotRetryExceptionTypes)
Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not. |
<T> CompletableFuture<T> |
invokeWithRetryAsync(Function<C, CompletableFuture<T>> func, Class<?>... doNotRetryExceptionTypes)
Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not. |
Constructor Details
FabricServicePartitionClient
public FabricServicePartitionClient(CommunicationClientFactory
Instantiates a service partition client that uses the specified communication client factory to create a client to talk to the service endpoint identified by the service uri argument.
Parameters:
FabricServicePartitionClient
public FabricServicePartitionClient(CommunicationClientFactory
Instantiates a service partition client that uses the specified communication client factory to create a client to talk to the service endpoint identified by the service uri, partitionkey arguments.
Parameters:
FabricServicePartitionClient
public FabricServicePartitionClient(CommunicationClientFactory
Instantiates a service partition client that uses the specified communication client factory to create a client to talk to the service endpoint identified by the service uri, partitionkey and replica selector arguments.
Parameters:
FabricServicePartitionClient
public FabricServicePartitionClient(CommunicationClientFactory
Instantiates a service partition client that uses the specified communication client factory to create a client to talk to the service endpoint identified by the service uri, partitionkey, replica and listener arguments.
Parameters:
FabricServicePartitionClient
public FabricServicePartitionClient(CommunicationClientFactory
Instantiates a service partition client that uses the specified communication client factory to create a client to talk to the service endpoint identified by the service uri, partitionkey, replica and listener arguments.
Parameters:
Method Details
getCommunicationClientFactory
public CommunicationClientFactory
Gets the communication client factory
Returns:
getLastResolvedServicePartition
public ResolvedServicePartition getLastResolvedServicePartition()
Gets the resolved service partition that was set on the client.
Returns:
getListenerName
public String getListenerName()
Gets the name of the listener in the replica to which the client should connect to.
Returns:
getPartitionKey
public ServicePartitionKey getPartitionKey()
Gets the partition key.
Returns:
getServiceUri
public URI getServiceUri()
Gets the name of the service
Returns:
getTargetReplicaSelector
public TargetReplicaSelector getTargetReplicaSelector()
Gets the information about which replica in the partition the client should connect to.
Returns:
invokeWithRetryAsync
public
Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.
Parameters:
Returns:
invokeWithRetryAsync
public
Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.
Parameters:
Returns:
Applies to
Azure SDK for Java