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

ServicePartitionKey 类

  • java.lang.Object
    • microsoft.servicefabric.services.client.ServicePartitionKey

public class ServicePartitionKey

定义用于寻址服务分区的键。

字段摘要

修饰符和类型 字段和描述
final ServicePartitionKey singleton

返回指示单一实例分区的 ServicePartitionKey。

构造函数摘要

构造函数 说明
ServicePartitionKey()

为单一实例分区服务创建 ServicePartitionKey。

ServicePartitionKey(long partitionKey)

为统一 int64 分区服务创建 ServicePartitionKey。

ServicePartitionKey(String partitionKey)

为命名的分区服务创建 ServicePartitionKey。

方法摘要

修饰符和类型 方法和描述
ServicePartitionKind kind()

此键适用的分区的类型。

Object value()

分区键的值。 可以根据 Kind 属性的值将此值强制转换为正确的类型。

字段详细信息

singleton

public static final ServicePartitionKey singleton= new ServicePartitionKey()

返回指示单一实例分区的 ServicePartitionKey。

构造函数详细信息

ServicePartitionKey

public ServicePartitionKey()

为单一实例分区服务创建 ServicePartitionKey。

ServicePartitionKey

public ServicePartitionKey(long partitionKey)

为统一 int64 分区服务创建 ServicePartitionKey。

Parameters:

partitionKey - int64 分区键的值。

ServicePartitionKey

public ServicePartitionKey(String partitionKey)

为命名的分区服务创建 ServicePartitionKey。

Parameters:

partitionKey - 命名分区键的值。

方法详细信息

kind

public ServicePartitionKind kind()

此键适用的分区的类型。

Returns:

分区类型

value

public Object value()

分区键的值。 可以根据 Kind 属性的值将此值强制转换为正确的类型。

Returns:

分区键

适用于