001// 002// Generated by protoc, do not edit by hand. 003// 004package org.apache.activemq.store.kahadb.data; 005 006 007public final class KahaAckMessageFileMapCommand extends KahaAckMessageFileMapCommandBase<KahaAckMessageFileMapCommand> implements org.apache.activemq.store.kahadb.JournalCommand<KahaAckMessageFileMapCommand> { 008 009 public java.util.ArrayList<String> missingFields() { 010 java.util.ArrayList<String> missingFields = super.missingFields(); 011 if( !hasAckMessageFileMap() ) { 012 missingFields.add("ackMessageFileMap"); 013 } 014 return missingFields; 015 } 016 017 public void clear() { 018 super.clear(); 019 clearAckMessageFileMap(); 020 } 021 022 public KahaAckMessageFileMapCommand clone() { 023 return new KahaAckMessageFileMapCommand().mergeFrom(this); 024 } 025 026 public KahaAckMessageFileMapCommand mergeFrom(KahaAckMessageFileMapCommand other) { 027 if (other.hasAckMessageFileMap()) { 028 setAckMessageFileMap(other.getAckMessageFileMap()); 029 } 030 return this; 031 } 032 033 public int serializedSizeUnframed() { 034 if (memoizedSerializedSize != -1) 035 return memoizedSerializedSize; 036 037 int size = 0; 038 if (hasAckMessageFileMap()) { 039 size += org.apache.activemq.protobuf.CodedOutputStream.computeBytesSize(1, getAckMessageFileMap()); 040 } 041 memoizedSerializedSize = size; 042 return size; 043 } 044 045 public KahaAckMessageFileMapCommand mergeUnframed(org.apache.activemq.protobuf.CodedInputStream input) throws java.io.IOException { 046 while (true) { 047 int tag = input.readTag(); 048 if ((tag & 0x07) == 4) { 049 return this; 050 } 051 switch (tag) { 052 case 0: 053 return this; 054 default: { 055 break; 056 } 057 case 10: 058 setAckMessageFileMap(input.readBytes()); 059 break; 060 } 061 } 062 } 063 public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException { 064 if (hasAckMessageFileMap()) { 065 output.writeBytes(1, getAckMessageFileMap()); 066 } 067 } 068 069 public static KahaAckMessageFileMapCommand parseUnframed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { 070 return new KahaAckMessageFileMapCommand().mergeUnframed(data).checktInitialized(); 071 } 072 073 public static KahaAckMessageFileMapCommand parseUnframed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { 074 return new KahaAckMessageFileMapCommand().mergeUnframed(data).checktInitialized(); 075 } 076 077 public static KahaAckMessageFileMapCommand parseUnframed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { 078 return new KahaAckMessageFileMapCommand().mergeUnframed(data).checktInitialized(); 079 } 080 081 public static KahaAckMessageFileMapCommand parseUnframed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { 082 return new KahaAckMessageFileMapCommand().mergeUnframed(data).checktInitialized(); 083 } 084 085 public static KahaAckMessageFileMapCommand parseFramed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { 086 return new KahaAckMessageFileMapCommand().mergeFramed(data).checktInitialized(); 087 } 088 089 public static KahaAckMessageFileMapCommand parseFramed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { 090 return new KahaAckMessageFileMapCommand().mergeFramed(data).checktInitialized(); 091 } 092 093 public static KahaAckMessageFileMapCommand parseFramed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { 094 return new KahaAckMessageFileMapCommand().mergeFramed(data).checktInitialized(); 095 } 096 097 public static KahaAckMessageFileMapCommand parseFramed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { 098 return new KahaAckMessageFileMapCommand().mergeFramed(data).checktInitialized(); 099 } 100 101 public String toString() { 102 return toString(new java.lang.StringBuilder(), "").toString(); 103 } 104 105 public java.lang.StringBuilder toString(java.lang.StringBuilder sb, String prefix) { 106 if( hasAckMessageFileMap() ) { 107 sb.append(prefix+"ackMessageFileMap: "); 108 sb.append(getAckMessageFileMap()); 109 sb.append("\n"); 110 } 111 return sb; 112 } 113 114 public void visit(org.apache.activemq.store.kahadb.Visitor visitor) throws java.io.IOException { 115 visitor.visit(this); 116 } 117 118 public KahaEntryType type() { 119 return KahaEntryType.KAHA_ACK_MESSAGE_FILE_MAP_COMMAND; 120 } 121 122 public boolean equals(Object obj) { 123 if( obj==this ) 124 return true; 125 126 if( obj==null || obj.getClass()!=KahaAckMessageFileMapCommand.class ) 127 return false; 128 129 return equals((KahaAckMessageFileMapCommand)obj); 130 } 131 132 public boolean equals(KahaAckMessageFileMapCommand obj) { 133 if (hasAckMessageFileMap() ^ obj.hasAckMessageFileMap() ) 134 return false; 135 if (hasAckMessageFileMap() && ( !getAckMessageFileMap().equals(obj.getAckMessageFileMap()) )) 136 return false; 137 return true; 138 } 139 140 public int hashCode() { 141 int rc=-259621928; 142 if (hasAckMessageFileMap()) { 143 rc ^= ( 161851650^getAckMessageFileMap().hashCode() ); 144 } 145 return rc; 146 } 147 148} 149 150abstract class KahaAckMessageFileMapCommandBase<T> extends org.apache.activemq.protobuf.BaseMessage<T> { 151 152 // required bytes ackMessageFileMap = 1; 153 private org.apache.activemq.protobuf.Buffer f_ackMessageFileMap = null; 154 private boolean b_ackMessageFileMap; 155 156 public boolean hasAckMessageFileMap() { 157 return this.b_ackMessageFileMap; 158 } 159 160 public org.apache.activemq.protobuf.Buffer getAckMessageFileMap() { 161 return this.f_ackMessageFileMap; 162 } 163 164 public T setAckMessageFileMap(org.apache.activemq.protobuf.Buffer ackMessageFileMap) { 165 loadAndClear(); 166 this.b_ackMessageFileMap = true; 167 this.f_ackMessageFileMap = ackMessageFileMap; 168 return (T)this; 169 } 170 171 public void clearAckMessageFileMap() { 172 loadAndClear(); 173 this.b_ackMessageFileMap = false; 174 this.f_ackMessageFileMap = null; 175 } 176 177} 178