AS AgentScopeAPI 手册 / API Reference

Builder

public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements io.agentscope.controlplane.proto.InstanceHealthOrBuilder
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:345–729

构建器,用于构建并配置目标实例。位于 io.agentscope.controlplane.proto 包,继承自 com.google.protobuf.GeneratedMessage.Builder<Builder>,实现 io.agentscope.controlplane.proto.InstanceHealthOrBuilder。核心成员包括 getDescriptor、internalGetFieldAccessorTable、clear、getDescriptorForType、getDefaultInstanceForType、build。


Instance health reported by data plane

Protobuf type agentscope.protocol.v1.InstanceHealth

方法摘要Method Summary

方法Method说明Description
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
staticfinal
获取描述符。
Returns the descriptor.
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
返回 `internalGetFieldAccessorTable` 结果。
Returns the internal get field accessor table.
public Builder clear()
清空或重置内部状态。
Clears or resets internal state.
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
获取 `getDescriptorForType`。
Returns the descriptor for type.
public io.agentscope.controlplane.proto.InstanceHealth getDefaultInstanceForType()
获取默认实例用于类型。
Returns the default instance for type.
public io.agentscope.controlplane.proto.InstanceHealth build()
构建并返回最终实例。
Creates and returns an instance.
public io.agentscope.controlplane.proto.InstanceHealth buildPartial()
构建 `buildPartial`。
Builds the partial.
public Builder mergeFrom(com.google.protobuf.Message other)
设置该配置项。
Performs the merge from operation.
public Builder mergeFrom(io.agentscope.controlplane.proto.InstanceHealth other)
设置该配置项。
Performs the merge from operation.
public final boolean isInitialized()
final
判断是否已初始化。
Returns whether the initialized.
public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
设置该配置项。
Performs the merge from operation.
public boolean getHealthy()
获取 `getHealthy`。
`bool healthy = 1;`
public Builder setHealthy(boolean value)
设置该配置项。
`bool healthy = 1;`
public Builder clearHealthy()
清空 `clearHealthy`。
`bool healthy = 1;`
public java.lang.String getReason()
获取推理。
`string reason = 2;`
public com.google.protobuf.ByteString getReasonBytes()
获取推理字节。
`string reason = 2;`
public Builder setReason(java.lang.String value)
设置设置推理。
`string reason = 2;`
public Builder clearReason()
清空推理。
`string reason = 2;`
public Builder setReasonBytes(com.google.protobuf.ByteString value)
设置设置推理字节。
`string reason = 2;`
public int getActiveSessions()
获取 `getActiveSessions`。
`int32 active_sessions = 3;`
public Builder setActiveSessions(int value)
设置该配置项。
`int32 active_sessions = 3;`
public Builder clearActiveSessions()
清空 `clearActiveSessions`。
`int32 active_sessions = 3;`
public double getCpuUsage()
获取 `getCpuUsage`。
`double cpu_usage = 4;`
public Builder setCpuUsage(double value)
设置该配置项。
`double cpu_usage = 4;`
public Builder clearCpuUsage()
清空 `clearCpuUsage`。
`double cpu_usage = 4;`
public double getMemoryUsage()
获取记忆用量。
`double memory_usage = 5;`
public Builder setMemoryUsage(double value)
设置设置记忆用量。
`double memory_usage = 5;`
public Builder clearMemoryUsage()
清空记忆用量。
`double memory_usage = 5;`

方法详情Method Detail

getDescriptor

public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
staticfinal

获取描述符。

Returns the descriptor.

返回Returns com.google.protobuf.Descriptors.Descriptor
返回com.google.protobuf.Descriptors.Descriptor。Returns com google protobuf descriptors descriptor.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:349–352

internalGetFieldAccessorTable

protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()

返回 internalGetFieldAccessorTable 结果。

Returns the internal get field accessor table.

返回Returns com.google.protobuf.GeneratedMessage.FieldAccessorTable
返回com.google.protobuf.GeneratedMessage.FieldAccessorTable。Returns com google protobuf generated message field accessor table.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:354–360

clear

public Builder clear()

清空或重置内部状态。

Clears or resets internal state.

返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:372–382

getDescriptorForType

public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()

获取 getDescriptorForType。

Returns the descriptor for type.

返回Returns com.google.protobuf.Descriptors.Descriptor
返回com.google.protobuf.Descriptors.Descriptor。Returns com google protobuf descriptors descriptor.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:384–388

getDefaultInstanceForType

public io.agentscope.controlplane.proto.InstanceHealth getDefaultInstanceForType()

获取默认实例用于类型。

Returns the default instance for type.

返回Returns io.agentscope.controlplane.proto.InstanceHealth
返回io.agentscope.controlplane.协议.InstanceHealth。Returns io agentscope controlplane proto instance health.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:390–393

build

public io.agentscope.controlplane.proto.InstanceHealth build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns io.agentscope.controlplane.proto.InstanceHealth
返回io.agentscope.controlplane.协议.InstanceHealth。Returns io agentscope controlplane proto instance health.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:395–402

buildPartial

public io.agentscope.controlplane.proto.InstanceHealth buildPartial()

构建 buildPartial。

Builds the partial.

返回Returns io.agentscope.controlplane.proto.InstanceHealth
返回io.agentscope.controlplane.协议.InstanceHealth。Returns io agentscope controlplane proto instance health.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:404–410

mergeFrom

public Builder mergeFrom(com.google.protobuf.Message other)

设置该配置项。

Performs the merge from operation.

参数Parameters
名称Name类型Type说明Description
othercom.google.protobuf.Messageother(类型 `com.google.protobuf.Message`)。The other.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:431–439

mergeFrom

public Builder mergeFrom(io.agentscope.controlplane.proto.InstanceHealth other)

设置该配置项。

Performs the merge from operation.

参数Parameters
名称Name类型Type说明Description
otherio.agentscope.controlplane.proto.InstanceHealthother(类型 `io.agentscope.controlplane.proto.InstanceHealth`)。The other.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:441–463

isInitialized

public final boolean isInitialized()
final

判断是否已初始化。

Returns whether the initialized.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:465–468

mergeFrom

public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException

设置该配置项。

Performs the merge from operation.

参数Parameters
名称Name类型Type说明Description
inputcom.google.protobuf.CodedInputStream输入消息(类型 `com.google.protobuf.CodedInputStream`)。The input.
extensionRegistrycom.google.protobuf.ExtensionRegistryLite扩展注册表(类型 `com.google.protobuf.ExtensionRegistryLite`)。The extension registry.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
抛出Throws
  • java.io.IOException 可能抛出 `java.io.IOException`。Thrown when the operation cannot be completed.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:470–525

getHealthy

public boolean getHealthy()

获取 getHealthy。

bool healthy = 1;

返回Returns boolean
返回布尔值,表示判断结果。The healthy.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:533–536

setHealthy

public Builder setHealthy(boolean value)

设置该配置项。

bool healthy = 1;

参数Parameters
名称Name类型Type说明Description
valueboolean值(类型 `boolean`)。The healthy to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:542–548

clearHealthy

public Builder clearHealthy()

清空 clearHealthy。

bool healthy = 1;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:553–558

getReason

public java.lang.String getReason()

获取推理。

string reason = 2;

返回Returns java.lang.String
推理。The reason.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:565–576

getReasonBytes

public com.google.protobuf.ByteString getReasonBytes()

获取推理字节。

string reason = 2;

返回Returns com.google.protobuf.ByteString
字节用于推理。The bytes for reason.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:581–593

setReason

public Builder setReason(java.lang.String value)

设置设置推理。

string reason = 2;

参数Parameters
名称Name类型Type说明Description
valuejava.lang.String推理到设置。The reason to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:599–606

clearReason

public Builder clearReason()

清空推理。

string reason = 2;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:611–616

setReasonBytes

public Builder setReasonBytes(com.google.protobuf.ByteString value)

设置设置推理字节。

string reason = 2;

参数Parameters
名称Name类型Type说明Description
valuecom.google.protobuf.ByteString字节用于推理到设置。The bytes for reason to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:622–630

getActiveSessions

public int getActiveSessions()

获取 getActiveSessions。

int32 active_sessions = 3;

返回Returns int
返回数值结果。The activeSessions.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:637–640

setActiveSessions

public Builder setActiveSessions(int value)

设置该配置项。

int32 active_sessions = 3;

参数Parameters
名称Name类型Type说明Description
valueintactiveSessions 到设置。The activeSessions to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:646–652

clearActiveSessions

public Builder clearActiveSessions()

清空 clearActiveSessions。

int32 active_sessions = 3;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:657–662

getCpuUsage

public double getCpuUsage()

获取 getCpuUsage。

double cpu_usage = 4;

返回Returns double
返回数值结果。The cpuUsage.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:669–672

setCpuUsage

public Builder setCpuUsage(double value)

设置该配置项。

double cpu_usage = 4;

参数Parameters
名称Name类型Type说明Description
valuedoublecpuUsage 到设置。The cpuUsage to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:678–684

clearCpuUsage

public Builder clearCpuUsage()

清空 clearCpuUsage。

double cpu_usage = 4;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:689–694

getMemoryUsage

public double getMemoryUsage()

获取记忆用量。

double memory_usage = 5;

返回Returns double
返回数值结果。The memoryUsage.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:701–704

setMemoryUsage

public Builder setMemoryUsage(double value)

设置设置记忆用量。

double memory_usage = 5;

参数Parameters
名称Name类型Type说明Description
valuedoublememoryUsage 到设置。The memoryUsage to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:710–716

clearMemoryUsage

public Builder clearMemoryUsage()

清空记忆用量。

double memory_usage = 5;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/InstanceHealth.java:721–726
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.