use of org.apache.pulsar.common.api.proto.PulsarApi.CommandConsumerStatsResponse in project incubator-pulsar by apache.
the class Commands method newConsumerStatsResponse.
public static ByteBuf newConsumerStatsResponse(CommandConsumerStatsResponse.Builder builder) {
CommandConsumerStatsResponse commandConsumerStatsResponse = builder.build();
ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.CONSUMER_STATS_RESPONSE).setConsumerStatsResponse(builder));
commandConsumerStatsResponse.recycle();
builder.recycle();
return res;
}
use of org.apache.pulsar.common.api.proto.PulsarApi.CommandConsumerStatsResponse in project incubator-pulsar by apache.
the class Commands method newConsumerStatsResponse.
public static ByteBuf newConsumerStatsResponse(ServerError serverError, String errMsg, long requestId) {
CommandConsumerStatsResponse.Builder commandConsumerStatsResponseBuilder = CommandConsumerStatsResponse.newBuilder();
commandConsumerStatsResponseBuilder.setRequestId(requestId);
commandConsumerStatsResponseBuilder.setErrorMessage(errMsg);
commandConsumerStatsResponseBuilder.setErrorCode(serverError);
CommandConsumerStatsResponse commandConsumerStatsResponse = commandConsumerStatsResponseBuilder.build();
ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.CONSUMER_STATS_RESPONSE).setConsumerStatsResponse(commandConsumerStatsResponseBuilder));
commandConsumerStatsResponse.recycle();
commandConsumerStatsResponseBuilder.recycle();
return res;
}
Aggregations