001// 002// Generated by protoc, do not edit by hand. 003// 004package org.apache.activemq.store.kahadb.data; 005 006 007public final class KahaRescheduleJobCommand extends KahaRescheduleJobCommandBase<KahaRescheduleJobCommand> implements org.apache.activemq.store.kahadb.JournalCommand<KahaRescheduleJobCommand> { 008 009 public java.util.ArrayList<String> missingFields() { 010 java.util.ArrayList<String> missingFields = super.missingFields(); 011 if( !hasScheduler() ) { 012 missingFields.add("scheduler"); 013 } 014 if( !hasJobId() ) { 015 missingFields.add("job_id"); 016 } 017 if( !hasExecutionTime() ) { 018 missingFields.add("execution_time"); 019 } 020 if( !hasNextExecutionTime() ) { 021 missingFields.add("next_execution_time"); 022 } 023 if( !hasRescheduledCount() ) { 024 missingFields.add("rescheduled_count"); 025 } 026 return missingFields; 027 } 028 029 public void clear() { 030 super.clear(); 031 clearScheduler(); 032 clearJobId(); 033 clearExecutionTime(); 034 clearNextExecutionTime(); 035 clearRescheduledCount(); 036 } 037 038 public KahaRescheduleJobCommand clone() { 039 return new KahaRescheduleJobCommand().mergeFrom(this); 040 } 041 042 public KahaRescheduleJobCommand mergeFrom(KahaRescheduleJobCommand other) { 043 if (other.hasScheduler()) { 044 setScheduler(other.getScheduler()); 045 } 046 if (other.hasJobId()) { 047 setJobId(other.getJobId()); 048 } 049 if (other.hasExecutionTime()) { 050 setExecutionTime(other.getExecutionTime()); 051 } 052 if (other.hasNextExecutionTime()) { 053 setNextExecutionTime(other.getNextExecutionTime()); 054 } 055 if (other.hasRescheduledCount()) { 056 setRescheduledCount(other.getRescheduledCount()); 057 } 058 return this; 059 } 060 061 public int serializedSizeUnframed() { 062 if (memoizedSerializedSize != -1) 063 return memoizedSerializedSize; 064 065 int size = 0; 066 if (hasScheduler()) { 067 size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(1, getScheduler()); 068 } 069 if (hasJobId()) { 070 size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(2, getJobId()); 071 } 072 if (hasExecutionTime()) { 073 size += org.apache.activemq.protobuf.CodedOutputStream.computeInt64Size(3, getExecutionTime()); 074 } 075 if (hasNextExecutionTime()) { 076 size += org.apache.activemq.protobuf.CodedOutputStream.computeInt64Size(4, getNextExecutionTime()); 077 } 078 if (hasRescheduledCount()) { 079 size += org.apache.activemq.protobuf.CodedOutputStream.computeInt32Size(5, getRescheduledCount()); 080 } 081 memoizedSerializedSize = size; 082 return size; 083 } 084 085 public KahaRescheduleJobCommand mergeUnframed(org.apache.activemq.protobuf.CodedInputStream input) throws java.io.IOException { 086 while (true) { 087 int tag = input.readTag(); 088 if ((tag & 0x07) == 4) { 089 return this; 090 } 091 switch (tag) { 092 case 0: 093 return this; 094 default: { 095 break; 096 } 097 case 10: 098 setScheduler(input.readString()); 099 break; 100 case 18: 101 setJobId(input.readString()); 102 break; 103 case 24: 104 setExecutionTime(input.readInt64()); 105 break; 106 case 32: 107 setNextExecutionTime(input.readInt64()); 108 break; 109 case 40: 110 setRescheduledCount(input.readInt32()); 111 break; 112 } 113 } 114 } 115 public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException { 116 if (hasScheduler()) { 117 output.writeString(1, getScheduler()); 118 } 119 if (hasJobId()) { 120 output.writeString(2, getJobId()); 121 } 122 if (hasExecutionTime()) { 123 output.writeInt64(3, getExecutionTime()); 124 } 125 if (hasNextExecutionTime()) { 126 output.writeInt64(4, getNextExecutionTime()); 127 } 128 if (hasRescheduledCount()) { 129 output.writeInt32(5, getRescheduledCount()); 130 } 131 } 132 133 public static KahaRescheduleJobCommand parseUnframed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { 134 return new KahaRescheduleJobCommand().mergeUnframed(data).checktInitialized(); 135 } 136 137 public static KahaRescheduleJobCommand parseUnframed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { 138 return new KahaRescheduleJobCommand().mergeUnframed(data).checktInitialized(); 139 } 140 141 public static KahaRescheduleJobCommand parseUnframed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { 142 return new KahaRescheduleJobCommand().mergeUnframed(data).checktInitialized(); 143 } 144 145 public static KahaRescheduleJobCommand parseUnframed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { 146 return new KahaRescheduleJobCommand().mergeUnframed(data).checktInitialized(); 147 } 148 149 public static KahaRescheduleJobCommand parseFramed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { 150 return new KahaRescheduleJobCommand().mergeFramed(data).checktInitialized(); 151 } 152 153 public static KahaRescheduleJobCommand parseFramed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { 154 return new KahaRescheduleJobCommand().mergeFramed(data).checktInitialized(); 155 } 156 157 public static KahaRescheduleJobCommand parseFramed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { 158 return new KahaRescheduleJobCommand().mergeFramed(data).checktInitialized(); 159 } 160 161 public static KahaRescheduleJobCommand parseFramed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { 162 return new KahaRescheduleJobCommand().mergeFramed(data).checktInitialized(); 163 } 164 165 public String toString() { 166 return toString(new java.lang.StringBuilder(), "").toString(); 167 } 168 169 public java.lang.StringBuilder toString(java.lang.StringBuilder sb, String prefix) { 170 if( hasScheduler() ) { 171 sb.append(prefix+"scheduler: "); 172 sb.append(getScheduler()); 173 sb.append("\n"); 174 } 175 if( hasJobId() ) { 176 sb.append(prefix+"job_id: "); 177 sb.append(getJobId()); 178 sb.append("\n"); 179 } 180 if( hasExecutionTime() ) { 181 sb.append(prefix+"execution_time: "); 182 sb.append(getExecutionTime()); 183 sb.append("\n"); 184 } 185 if( hasNextExecutionTime() ) { 186 sb.append(prefix+"next_execution_time: "); 187 sb.append(getNextExecutionTime()); 188 sb.append("\n"); 189 } 190 if( hasRescheduledCount() ) { 191 sb.append(prefix+"rescheduled_count: "); 192 sb.append(getRescheduledCount()); 193 sb.append("\n"); 194 } 195 return sb; 196 } 197 198 public void visit(org.apache.activemq.store.kahadb.Visitor visitor) throws java.io.IOException { 199 visitor.visit(this); 200 } 201 202 public KahaEntryType type() { 203 return KahaEntryType.KAHA_RESCHEDULE_JOB_COMMAND; 204 } 205 206 public boolean equals(Object obj) { 207 if( obj==this ) 208 return true; 209 210 if( obj==null || obj.getClass()!=KahaRescheduleJobCommand.class ) 211 return false; 212 213 return equals((KahaRescheduleJobCommand)obj); 214 } 215 216 public boolean equals(KahaRescheduleJobCommand obj) { 217 if (hasScheduler() ^ obj.hasScheduler() ) 218 return false; 219 if (hasScheduler() && ( !getScheduler().equals(obj.getScheduler()) )) 220 return false; 221 if (hasJobId() ^ obj.hasJobId() ) 222 return false; 223 if (hasJobId() && ( !getJobId().equals(obj.getJobId()) )) 224 return false; 225 if (hasExecutionTime() ^ obj.hasExecutionTime() ) 226 return false; 227 if (hasExecutionTime() && ( getExecutionTime()!=obj.getExecutionTime() )) 228 return false; 229 if (hasNextExecutionTime() ^ obj.hasNextExecutionTime() ) 230 return false; 231 if (hasNextExecutionTime() && ( getNextExecutionTime()!=obj.getNextExecutionTime() )) 232 return false; 233 if (hasRescheduledCount() ^ obj.hasRescheduledCount() ) 234 return false; 235 if (hasRescheduledCount() && ( getRescheduledCount()!=obj.getRescheduledCount() )) 236 return false; 237 return true; 238 } 239 240 public int hashCode() { 241 int rc=-900859449; 242 if (hasScheduler()) { 243 rc ^= ( 1843257499^getScheduler().hashCode() ); 244 } 245 if (hasJobId()) { 246 rc ^= ( 71743896^getJobId().hashCode() ); 247 } 248 if (hasExecutionTime()) { 249 rc ^= ( 1721021925^(new Long(getExecutionTime())).hashCode() ); 250 } 251 if (hasNextExecutionTime()) { 252 rc ^= ( 1882983858^(new Long(getNextExecutionTime())).hashCode() ); 253 } 254 if (hasRescheduledCount()) { 255 rc ^= ( -699334283^getRescheduledCount() ); 256 } 257 return rc; 258 } 259 260} 261 262abstract class KahaRescheduleJobCommandBase<T> extends org.apache.activemq.protobuf.BaseMessage<T> { 263 264 // required string scheduler = 1; 265 private java.lang.String f_scheduler = null; 266 private boolean b_scheduler; 267 268 public boolean hasScheduler() { 269 return this.b_scheduler; 270 } 271 272 public java.lang.String getScheduler() { 273 return this.f_scheduler; 274 } 275 276 public T setScheduler(java.lang.String scheduler) { 277 loadAndClear(); 278 this.b_scheduler = true; 279 this.f_scheduler = scheduler; 280 return (T)this; 281 } 282 283 public void clearScheduler() { 284 loadAndClear(); 285 this.b_scheduler = false; 286 this.f_scheduler = null; 287 } 288 289 // required string job_id = 2; 290 private java.lang.String f_jobId = null; 291 private boolean b_jobId; 292 293 public boolean hasJobId() { 294 return this.b_jobId; 295 } 296 297 public java.lang.String getJobId() { 298 return this.f_jobId; 299 } 300 301 public T setJobId(java.lang.String jobId) { 302 loadAndClear(); 303 this.b_jobId = true; 304 this.f_jobId = jobId; 305 return (T)this; 306 } 307 308 public void clearJobId() { 309 loadAndClear(); 310 this.b_jobId = false; 311 this.f_jobId = null; 312 } 313 314 // required int64 execution_time = 3; 315 private long f_executionTime = 0; 316 private boolean b_executionTime; 317 318 public boolean hasExecutionTime() { 319 return this.b_executionTime; 320 } 321 322 public long getExecutionTime() { 323 return this.f_executionTime; 324 } 325 326 public T setExecutionTime(long executionTime) { 327 loadAndClear(); 328 this.b_executionTime = true; 329 this.f_executionTime = executionTime; 330 return (T)this; 331 } 332 333 public void clearExecutionTime() { 334 loadAndClear(); 335 this.b_executionTime = false; 336 this.f_executionTime = 0; 337 } 338 339 // required int64 next_execution_time = 4; 340 private long f_nextExecutionTime = 0; 341 private boolean b_nextExecutionTime; 342 343 public boolean hasNextExecutionTime() { 344 return this.b_nextExecutionTime; 345 } 346 347 public long getNextExecutionTime() { 348 return this.f_nextExecutionTime; 349 } 350 351 public T setNextExecutionTime(long nextExecutionTime) { 352 loadAndClear(); 353 this.b_nextExecutionTime = true; 354 this.f_nextExecutionTime = nextExecutionTime; 355 return (T)this; 356 } 357 358 public void clearNextExecutionTime() { 359 loadAndClear(); 360 this.b_nextExecutionTime = false; 361 this.f_nextExecutionTime = 0; 362 } 363 364 // required int32 rescheduled_count = 5; 365 private int f_rescheduledCount = 0; 366 private boolean b_rescheduledCount; 367 368 public boolean hasRescheduledCount() { 369 return this.b_rescheduledCount; 370 } 371 372 public int getRescheduledCount() { 373 return this.f_rescheduledCount; 374 } 375 376 public T setRescheduledCount(int rescheduledCount) { 377 loadAndClear(); 378 this.b_rescheduledCount = true; 379 this.f_rescheduledCount = rescheduledCount; 380 return (T)this; 381 } 382 383 public void clearRescheduledCount() { 384 loadAndClear(); 385 this.b_rescheduledCount = false; 386 this.f_rescheduledCount = 0; 387 } 388 389} 390