Search in sources :

Example 1 with CommandLookupTopic

use of com.yahoo.pulsar.common.api.proto.PulsarApi.CommandLookupTopic in project pulsar by yahoo.

the class Commands method newLookup.

public static ByteBuf newLookup(String topic, boolean authoritative, long requestId) {
    CommandLookupTopic.Builder lookupTopicBuilder = CommandLookupTopic.newBuilder();
    lookupTopicBuilder.setTopic(topic);
    lookupTopicBuilder.setRequestId(requestId);
    lookupTopicBuilder.setAuthoritative(authoritative);
    CommandLookupTopic lookupBroker = lookupTopicBuilder.build();
    ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.LOOKUP).setLookupTopic(lookupBroker));
    lookupTopicBuilder.recycle();
    lookupBroker.recycle();
    return res;
}
Also used : CommandLookupTopic(com.yahoo.pulsar.common.api.proto.PulsarApi.CommandLookupTopic) UnpooledHeapByteBuf(io.netty.buffer.UnpooledHeapByteBuf) RecyclableDuplicateByteBuf(io.netty.buffer.RecyclableDuplicateByteBuf) ByteBuf(io.netty.buffer.ByteBuf)

Aggregations

CommandLookupTopic (com.yahoo.pulsar.common.api.proto.PulsarApi.CommandLookupTopic)1 ByteBuf (io.netty.buffer.ByteBuf)1 RecyclableDuplicateByteBuf (io.netty.buffer.RecyclableDuplicateByteBuf)1 UnpooledHeapByteBuf (io.netty.buffer.UnpooledHeapByteBuf)1