共用方式為


ResolvedServicePartition Class

  • java.lang.Object
    • system.fabric.ResolvedServicePartition

public class ResolvedServicePartition

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

Field Summary

Modifier and Type Field and Description
long resolvedServicePartitionResultNative

Method Summary

Modifier and Type Method and Description
int compareVersion(ResolvedServicePartition other)

Compares two resolved service partitions and identifies which is newer.

ResolvedServiceEndpoint getEndpoint()

Gets the endpoints of the service partition.

List<ResolvedServiceEndpoint> getEndpoints()

Returns a single endpoint, instead of a collection of all endpoints.

Remarks:Many times, you only need a single endpoint instead of all the endpoints. If the service is stateless, it returns a random endpoint. If the service is a stateful service, than it returns the endpoint to which the Primary replica of the service partition listens. Note that if the Primary replica currently does not exist, it throws FabricException.

URI getServiceName()

Gets the name of the service instance.

ServicePartitionInformation getServicePartitionInfo()

Gets information about the partition of the service that was resolved.

String toString()

Get the system.fabric.ResolvedServicePartition instance values as a String.

Field Details

resolvedServicePartitionResultNative

public long resolvedServicePartitionResultNative

Method Details

compareVersion

public int compareVersion(ResolvedServicePartition other)

Compares two resolved service partitions and identifies which is newer.

Parameters:

other - The other resolved service partition to compare. resolved service partition (RSP) argument with the parameter

Returns:

Returns int.

getEndpoint

public ResolvedServiceEndpoint getEndpoint()

Gets the endpoints of the service partition.

Returns:

A collection of ResolvedServiceEndpoint for a service partition.

getEndpoints

public List getEndpoints()

Returns a single endpoint, instead of a collection of all endpoints.

Remarks:Many times, you only need a single endpoint instead of all the endpoints. If the service is stateless, it returns a random endpoint. If the service is a stateful service, than it returns the endpoint to which the Primary replica of the service partition listens. Note that if the Primary replica currently does not exist, it throws FabricException.

Returns:

getServiceName

public URI getServiceName()

Gets the name of the service instance.

Returns:

Return java.net.URI.

getServicePartitionInfo

public ServicePartitionInformation getServicePartitionInfo()

Gets information about the partition of the service that was resolved.

Returns:

The information about the partition of the service that was resolved.

toString

public String toString()

Get the system.fabric.ResolvedServicePartition instance values as a String.

Returns:

String representation of the system.fabric.ResolvedServicePartition instance.

Applies to