org.apache.activemq.store.kahadb.data.KahaAckMessageFileMapCommand Maven / Gradle / Ivy
//
// Generated by protoc, do not edit by hand.
//
package org.apache.activemq.store.kahadb.data;
public final class KahaAckMessageFileMapCommand extends KahaAckMessageFileMapCommandBase implements org.apache.activemq.store.kahadb.JournalCommand {
public java.util.ArrayList missingFields() {
java.util.ArrayList missingFields = super.missingFields();
if( !hasAckMessageFileMap() ) {
missingFields.add("ackMessageFileMap");
}
return missingFields;
}
public void clear() {
super.clear();
clearAckMessageFileMap();
}
public KahaAckMessageFileMapCommand clone() {
return new KahaAckMessageFileMapCommand().mergeFrom(this);
}
public KahaAckMessageFileMapCommand mergeFrom(KahaAckMessageFileMapCommand other) {
if (other.hasAckMessageFileMap()) {
setAckMessageFileMap(other.getAckMessageFileMap());
}
return this;
}
public int serializedSizeUnframed() {
if (memoizedSerializedSize != -1)
return memoizedSerializedSize;
int size = 0;
if (hasAckMessageFileMap()) {
size += org.apache.activemq.protobuf.CodedOutputStream.computeBytesSize(1, getAckMessageFileMap());
}
memoizedSerializedSize = size;
return size;
}
public KahaAckMessageFileMapCommand mergeUnframed(org.apache.activemq.protobuf.CodedInputStream input) throws java.io.IOException {
while (true) {
int tag = input.readTag();
if ((tag & 0x07) == 4) {
return this;
}
switch (tag) {
case 0:
return this;
default: {
break;
}
case 10:
setAckMessageFileMap(input.readBytes());
break;
}
}
}
public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException {
if (hasAckMessageFileMap()) {
output.writeBytes(1, getAckMessageFileMap());
}
}
public static KahaAckMessageFileMapCommand parseUnframed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
return new KahaAckMessageFileMapCommand().mergeUnframed(data).checktInitialized();
}
public static KahaAckMessageFileMapCommand parseUnframed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
return new KahaAckMessageFileMapCommand().mergeUnframed(data).checktInitialized();
}
public static KahaAckMessageFileMapCommand parseUnframed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
return new KahaAckMessageFileMapCommand().mergeUnframed(data).checktInitialized();
}
public static KahaAckMessageFileMapCommand parseUnframed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
return new KahaAckMessageFileMapCommand().mergeUnframed(data).checktInitialized();
}
public static KahaAckMessageFileMapCommand parseFramed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
return new KahaAckMessageFileMapCommand().mergeFramed(data).checktInitialized();
}
public static KahaAckMessageFileMapCommand parseFramed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
return new KahaAckMessageFileMapCommand().mergeFramed(data).checktInitialized();
}
public static KahaAckMessageFileMapCommand parseFramed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
return new KahaAckMessageFileMapCommand().mergeFramed(data).checktInitialized();
}
public static KahaAckMessageFileMapCommand parseFramed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
return new KahaAckMessageFileMapCommand().mergeFramed(data).checktInitialized();
}
public String toString() {
return toString(new java.lang.StringBuilder(), "").toString();
}
public java.lang.StringBuilder toString(java.lang.StringBuilder sb, String prefix) {
if( hasAckMessageFileMap() ) {
sb.append(prefix+"ackMessageFileMap: ");
sb.append(getAckMessageFileMap());
sb.append("\n");
}
return sb;
}
public void visit(org.apache.activemq.store.kahadb.Visitor visitor) throws java.io.IOException {
visitor.visit(this);
}
public KahaEntryType type() {
return KahaEntryType.KAHA_ACK_MESSAGE_FILE_MAP_COMMAND;
}
public boolean equals(Object obj) {
if( obj==this )
return true;
if( obj==null || obj.getClass()!=KahaAckMessageFileMapCommand.class )
return false;
return equals((KahaAckMessageFileMapCommand)obj);
}
public boolean equals(KahaAckMessageFileMapCommand obj) {
if (hasAckMessageFileMap() ^ obj.hasAckMessageFileMap() )
return false;
if (hasAckMessageFileMap() && ( !getAckMessageFileMap().equals(obj.getAckMessageFileMap()) ))
return false;
return true;
}
public int hashCode() {
int rc=-259621928;
if (hasAckMessageFileMap()) {
rc ^= ( 161851650^getAckMessageFileMap().hashCode() );
}
return rc;
}
}
abstract class KahaAckMessageFileMapCommandBase extends org.apache.activemq.protobuf.BaseMessage {
// required bytes ackMessageFileMap = 1;
private org.apache.activemq.protobuf.Buffer f_ackMessageFileMap = null;
private boolean b_ackMessageFileMap;
public boolean hasAckMessageFileMap() {
return this.b_ackMessageFileMap;
}
public org.apache.activemq.protobuf.Buffer getAckMessageFileMap() {
return this.f_ackMessageFileMap;
}
public T setAckMessageFileMap(org.apache.activemq.protobuf.Buffer ackMessageFileMap) {
loadAndClear();
this.b_ackMessageFileMap = true;
this.f_ackMessageFileMap = ackMessageFileMap;
return (T)this;
}
public void clearAckMessageFileMap() {
loadAndClear();
this.b_ackMessageFileMap = false;
this.f_ackMessageFileMap = null;
}
}