org.apache.activemq.store.kahadb.data.KahaProducerAuditCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of activemq-osgi Show documentation
Show all versions of activemq-osgi Show documentation
Puts together an ActiveMQ OSGi bundle
//
// Generated by protoc, do not edit by hand.
//
package org.apache.activemq.store.kahadb.data;
public final class KahaProducerAuditCommand extends KahaProducerAuditCommandBase implements org.apache.activemq.store.kahadb.JournalCommand {
public java.util.ArrayList missingFields() {
java.util.ArrayList missingFields = super.missingFields();
if( !hasAudit() ) {
missingFields.add("audit");
}
return missingFields;
}
public void clear() {
super.clear();
clearAudit();
}
public KahaProducerAuditCommand clone() {
return new KahaProducerAuditCommand().mergeFrom(this);
}
public KahaProducerAuditCommand mergeFrom(KahaProducerAuditCommand other) {
if (other.hasAudit()) {
setAudit(other.getAudit());
}
return this;
}
public int serializedSizeUnframed() {
if (memoizedSerializedSize != -1)
return memoizedSerializedSize;
int size = 0;
if (hasAudit()) {
size += org.apache.activemq.protobuf.CodedOutputStream.computeBytesSize(1, getAudit());
}
memoizedSerializedSize = size;
return size;
}
public KahaProducerAuditCommand 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:
setAudit(input.readBytes());
break;
}
}
}
public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException {
if (hasAudit()) {
output.writeBytes(1, getAudit());
}
}
public static KahaProducerAuditCommand parseUnframed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
return new KahaProducerAuditCommand().mergeUnframed(data).checktInitialized();
}
public static KahaProducerAuditCommand parseUnframed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
return new KahaProducerAuditCommand().mergeUnframed(data).checktInitialized();
}
public static KahaProducerAuditCommand parseUnframed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
return new KahaProducerAuditCommand().mergeUnframed(data).checktInitialized();
}
public static KahaProducerAuditCommand parseUnframed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
return new KahaProducerAuditCommand().mergeUnframed(data).checktInitialized();
}
public static KahaProducerAuditCommand parseFramed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
return new KahaProducerAuditCommand().mergeFramed(data).checktInitialized();
}
public static KahaProducerAuditCommand parseFramed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
return new KahaProducerAuditCommand().mergeFramed(data).checktInitialized();
}
public static KahaProducerAuditCommand parseFramed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
return new KahaProducerAuditCommand().mergeFramed(data).checktInitialized();
}
public static KahaProducerAuditCommand parseFramed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
return new KahaProducerAuditCommand().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( hasAudit() ) {
sb.append(prefix+"audit: ");
sb.append(getAudit());
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_PRODUCER_AUDIT_COMMAND;
}
public boolean equals(Object obj) {
if( obj==this )
return true;
if( obj==null || obj.getClass()!=KahaProducerAuditCommand.class )
return false;
return equals((KahaProducerAuditCommand)obj);
}
public boolean equals(KahaProducerAuditCommand obj) {
if (hasAudit() ^ obj.hasAudit() )
return false;
if (hasAudit() && ( !getAudit().equals(obj.getAudit()) ))
return false;
return true;
}
public int hashCode() {
int rc=691941169;
if (hasAudit()) {
rc ^= ( 63613883^getAudit().hashCode() );
}
return rc;
}
}
abstract class KahaProducerAuditCommandBase extends org.apache.activemq.protobuf.BaseMessage {
// required bytes audit = 1;
private org.apache.activemq.protobuf.Buffer f_audit = null;
private boolean b_audit;
public boolean hasAudit() {
return this.b_audit;
}
public org.apache.activemq.protobuf.Buffer getAudit() {
return this.f_audit;
}
public T setAudit(org.apache.activemq.protobuf.Buffer audit) {
loadAndClear();
this.b_audit = true;
this.f_audit = audit;
return (T)this;
}
public void clearAudit() {
loadAndClear();
this.b_audit = false;
this.f_audit = null;
}
}