@Override protected void handleProducerSuccess(CommandProducerSuccess success) { checkArgument(state == State.Ready); if (log.isDebugEnabled()) { log.debug("{} Received producer success response from server: {} - producer-name: {}", ctx.channel(), success.getRequestId(), success.getProducerName()); } long requestId = success.getRequestId(); CompletableFuture<ProducerResponse> requestFuture = pendingRequests.remove(requestId); if (requestFuture != null) { requestFuture.complete(new ProducerResponse(success.getProducerName(), success.getLastSequenceId(), success.getSchemaVersion().toByteArray())); } else { log.warn("{} Received unknown request id from server: {}", ctx.channel(), success.getRequestId()); } }
closeConsumer_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandCloseConsumer.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00008000); producerSuccess_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00010000); ping_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandPing.getDefaultInstance();
closeProducer_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandCloseProducer.getDefaultInstance(); closeConsumer_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandCloseConsumer.getDefaultInstance(); producerSuccess_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess.getDefaultInstance(); ping_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandPing.getDefaultInstance(); pong_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandPong.getDefaultInstance();
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += org.apache.pulsar.shaded.com.google.protobuf.v241.CodedOutputStream .computeUInt64Size(1, requestId_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += org.apache.pulsar.shaded.com.google.protobuf.v241.CodedOutputStream .computeBytesSize(2, getProducerNameBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += org.apache.pulsar.shaded.com.google.protobuf.v241.CodedOutputStream .computeInt64Size(3, lastSequenceId_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += org.apache.pulsar.shaded.com.google.protobuf.v241.CodedOutputStream .computeBytesSize(4, schemaVersion_); } memoizedSerializedSize = size; return size; }
public void writeTo(org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt64(1, requestId_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getProducerNameBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt64(3, lastSequenceId_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, schemaVersion_); } }
@Override protected void handleProducerSuccess(CommandProducerSuccess success) { checkArgument(state == State.Ready); if (log.isDebugEnabled()) { log.debug("{} Received producer success response from server: {} - producer-name: {}", ctx.channel(), success.getRequestId(), success.getProducerName()); } long requestId = success.getRequestId(); CompletableFuture<ProducerResponse> requestFuture = pendingRequests.remove(requestId); if (requestFuture != null) { requestFuture.complete(new ProducerResponse(success.getProducerName(), success.getLastSequenceId(), success.getSchemaVersion().toByteArray())); } else { log.warn("{} Received unknown request id from server: {}", ctx.channel(), success.getRequestId()); } }
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasRequestId()) { memoizedIsInitialized = 0; return false; } if (!hasProducerName()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; }
public org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess getDefaultInstanceForType() { return org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess.getDefaultInstance(); }
public Builder mergeFrom(org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess other) { if (other == org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess.getDefaultInstance()) return this; if (other.hasRequestId()) { setRequestId(other.getRequestId()); } if (other.hasProducerName()) { setProducerName(other.getProducerName()); } if (other.hasLastSequenceId()) { setLastSequenceId(other.getLastSequenceId()); } if (other.hasSchemaVersion()) { setSchemaVersion(other.getSchemaVersion()); } return this; }
public Builder clearProducerSuccess() { producerSuccess_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00010000); return this; }
public Builder mergeProducerSuccess(org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess value) { if (((bitField0_ & 0x00010000) == 0x00010000) && producerSuccess_ != org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess.getDefaultInstance()) { producerSuccess_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess.newBuilder(producerSuccess_).mergeFrom(value).buildPartial(); } else { producerSuccess_ = value; } bitField0_ |= 0x00010000; return this; } public Builder clearProducerSuccess() {
public Builder clearProducerName() { bitField0_ = (bitField0_ & ~0x00000002); producerName_ = getDefaultInstance().getProducerName(); return this; } void setProducerName(org.apache.pulsar.shaded.com.google.protobuf.v241.ByteString value) {
public Builder clearSchemaVersion() { bitField0_ = (bitField0_ & ~0x00000008); schemaVersion_ = getDefaultInstance().getSchemaVersion(); return this; }
closeConsumer_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandCloseConsumer.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00008000); producerSuccess_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00010000); ping_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandPing.getDefaultInstance();
closeProducer_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandCloseProducer.getDefaultInstance(); closeConsumer_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandCloseConsumer.getDefaultInstance(); producerSuccess_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess.getDefaultInstance(); ping_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandPing.getDefaultInstance(); pong_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandPong.getDefaultInstance();
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += org.apache.pulsar.shaded.com.google.protobuf.v241.CodedOutputStream .computeUInt64Size(1, requestId_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += org.apache.pulsar.shaded.com.google.protobuf.v241.CodedOutputStream .computeBytesSize(2, getProducerNameBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += org.apache.pulsar.shaded.com.google.protobuf.v241.CodedOutputStream .computeInt64Size(3, lastSequenceId_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += org.apache.pulsar.shaded.com.google.protobuf.v241.CodedOutputStream .computeBytesSize(4, schemaVersion_); } memoizedSerializedSize = size; return size; }
public void writeTo(org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt64(1, requestId_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getProducerNameBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt64(3, lastSequenceId_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, schemaVersion_); } }
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasRequestId()) { memoizedIsInitialized = 0; return false; } if (!hasProducerName()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; }
public Builder mergeFrom(org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess other) { if (other == org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess.getDefaultInstance()) return this; if (other.hasRequestId()) { setRequestId(other.getRequestId()); } if (other.hasProducerName()) { setProducerName(other.getProducerName()); } if (other.hasLastSequenceId()) { setLastSequenceId(other.getLastSequenceId()); } if (other.hasSchemaVersion()) { setSchemaVersion(other.getSchemaVersion()); } return this; }
public org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess getDefaultInstanceForType() { return org.apache.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess.getDefaultInstance(); }