use of com.yahoo.pulsar.common.api.proto.PulsarApi.CommandFlow in project pulsar by yahoo.
the class Commands method newFlow.
public static ByteBuf newFlow(long consumerId, int messagePermits) {
CommandFlow.Builder flowBuilder = CommandFlow.newBuilder();
flowBuilder.setConsumerId(consumerId);
flowBuilder.setMessagePermits(messagePermits);
CommandFlow flow = flowBuilder.build();
ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.FLOW).setFlow(flowBuilder));
flow.recycle();
flowBuilder.recycle();
return res;
}
Aggregations