All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.activemq.store.kahadb.data.KahaRescheduleJobCommand Maven / Gradle / Ivy

There is a newer version: 6.1.2
Show newest version
//
// Generated by protoc, do not edit by hand.
//
package org.apache.activemq.store.kahadb.data;


public final class KahaRescheduleJobCommand extends KahaRescheduleJobCommandBase implements org.apache.activemq.store.kahadb.JournalCommand {

   public java.util.ArrayList missingFields() {
      java.util.ArrayList missingFields = super.missingFields();
      if(  !hasScheduler() ) {
         missingFields.add("scheduler");
      }
      if(  !hasJobId() ) {
         missingFields.add("job_id");
      }
      if(  !hasExecutionTime() ) {
         missingFields.add("execution_time");
      }
      if(  !hasNextExecutionTime() ) {
         missingFields.add("next_execution_time");
      }
      if(  !hasRescheduledCount() ) {
         missingFields.add("rescheduled_count");
      }
      return missingFields;
   }

   public void clear() {
      super.clear();
      clearScheduler();
      clearJobId();
      clearExecutionTime();
      clearNextExecutionTime();
      clearRescheduledCount();
   }

   public KahaRescheduleJobCommand clone() {
      return new KahaRescheduleJobCommand().mergeFrom(this);
   }

   public KahaRescheduleJobCommand mergeFrom(KahaRescheduleJobCommand other) {
      if (other.hasScheduler()) {
         setScheduler(other.getScheduler());
      }
      if (other.hasJobId()) {
         setJobId(other.getJobId());
      }
      if (other.hasExecutionTime()) {
         setExecutionTime(other.getExecutionTime());
      }
      if (other.hasNextExecutionTime()) {
         setNextExecutionTime(other.getNextExecutionTime());
      }
      if (other.hasRescheduledCount()) {
         setRescheduledCount(other.getRescheduledCount());
      }
      return this;
   }

   public int serializedSizeUnframed() {
      if (memoizedSerializedSize != -1)
         return memoizedSerializedSize;

      int size = 0;
      if (hasScheduler()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(1, getScheduler());
      }
      if (hasJobId()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(2, getJobId());
      }
      if (hasExecutionTime()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeInt64Size(3, getExecutionTime());
      }
      if (hasNextExecutionTime()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeInt64Size(4, getNextExecutionTime());
      }
      if (hasRescheduledCount()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeInt32Size(5, getRescheduledCount());
      }
      memoizedSerializedSize = size;
      return size;
   }

   public KahaRescheduleJobCommand 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:
            setScheduler(input.readString());
            break;
         case 18:
            setJobId(input.readString());
            break;
         case 24:
            setExecutionTime(input.readInt64());
            break;
         case 32:
            setNextExecutionTime(input.readInt64());
            break;
         case 40:
            setRescheduledCount(input.readInt32());
            break;
         }
      }
   }
   public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException {
      if (hasScheduler()) {
         output.writeString(1, getScheduler());
      }
      if (hasJobId()) {
         output.writeString(2, getJobId());
      }
      if (hasExecutionTime()) {
         output.writeInt64(3, getExecutionTime());
      }
      if (hasNextExecutionTime()) {
         output.writeInt64(4, getNextExecutionTime());
      }
      if (hasRescheduledCount()) {
         output.writeInt32(5, getRescheduledCount());
      }
   }

   public static KahaRescheduleJobCommand parseUnframed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
      return new KahaRescheduleJobCommand().mergeUnframed(data).checktInitialized();
   }

   public static KahaRescheduleJobCommand parseUnframed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
      return new KahaRescheduleJobCommand().mergeUnframed(data).checktInitialized();
   }

   public static KahaRescheduleJobCommand parseUnframed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
      return new KahaRescheduleJobCommand().mergeUnframed(data).checktInitialized();
   }

   public static KahaRescheduleJobCommand parseUnframed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
      return new KahaRescheduleJobCommand().mergeUnframed(data).checktInitialized();
   }

   public static KahaRescheduleJobCommand parseFramed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
      return new KahaRescheduleJobCommand().mergeFramed(data).checktInitialized();
   }

   public static KahaRescheduleJobCommand parseFramed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
      return new KahaRescheduleJobCommand().mergeFramed(data).checktInitialized();
   }

   public static KahaRescheduleJobCommand parseFramed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
      return new KahaRescheduleJobCommand().mergeFramed(data).checktInitialized();
   }

   public static KahaRescheduleJobCommand parseFramed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
      return new KahaRescheduleJobCommand().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(  hasScheduler() ) {
         sb.append(prefix+"scheduler: ");
         sb.append(getScheduler());
         sb.append("\n");
      }
      if(  hasJobId() ) {
         sb.append(prefix+"job_id: ");
         sb.append(getJobId());
         sb.append("\n");
      }
      if(  hasExecutionTime() ) {
         sb.append(prefix+"execution_time: ");
         sb.append(getExecutionTime());
         sb.append("\n");
      }
      if(  hasNextExecutionTime() ) {
         sb.append(prefix+"next_execution_time: ");
         sb.append(getNextExecutionTime());
         sb.append("\n");
      }
      if(  hasRescheduledCount() ) {
         sb.append(prefix+"rescheduled_count: ");
         sb.append(getRescheduledCount());
         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_RESCHEDULE_JOB_COMMAND;
   }

   public boolean equals(Object obj) {
      if( obj==this )
         return true;
      
      if( obj==null || obj.getClass()!=KahaRescheduleJobCommand.class )
         return false;
      
      return equals((KahaRescheduleJobCommand)obj);
   }
   
   public boolean equals(KahaRescheduleJobCommand obj) {
      if (hasScheduler() ^ obj.hasScheduler() ) 
         return false;
      if (hasScheduler() && ( !getScheduler().equals(obj.getScheduler()) ))
         return false;
      if (hasJobId() ^ obj.hasJobId() ) 
         return false;
      if (hasJobId() && ( !getJobId().equals(obj.getJobId()) ))
         return false;
      if (hasExecutionTime() ^ obj.hasExecutionTime() ) 
         return false;
      if (hasExecutionTime() && ( getExecutionTime()!=obj.getExecutionTime() ))
         return false;
      if (hasNextExecutionTime() ^ obj.hasNextExecutionTime() ) 
         return false;
      if (hasNextExecutionTime() && ( getNextExecutionTime()!=obj.getNextExecutionTime() ))
         return false;
      if (hasRescheduledCount() ^ obj.hasRescheduledCount() ) 
         return false;
      if (hasRescheduledCount() && ( getRescheduledCount()!=obj.getRescheduledCount() ))
         return false;
      return true;
   }
   
   public int hashCode() {
      int rc=-900859449;
      if (hasScheduler()) {
         rc ^= ( 1843257499^getScheduler().hashCode() );
      }
      if (hasJobId()) {
         rc ^= ( 71743896^getJobId().hashCode() );
      }
      if (hasExecutionTime()) {
         rc ^= ( 1721021925^(new Long(getExecutionTime())).hashCode() );
      }
      if (hasNextExecutionTime()) {
         rc ^= ( 1882983858^(new Long(getNextExecutionTime())).hashCode() );
      }
      if (hasRescheduledCount()) {
         rc ^= ( -699334283^getRescheduledCount() );
      }
      return rc;
   }
   
}

abstract class KahaRescheduleJobCommandBase extends org.apache.activemq.protobuf.BaseMessage {

   // required string scheduler = 1;
   private java.lang.String f_scheduler = null;
   private boolean b_scheduler;

   public boolean hasScheduler() {
      return this.b_scheduler;
   }

   public java.lang.String getScheduler() {
      return this.f_scheduler;
   }

   public T setScheduler(java.lang.String scheduler) {
      loadAndClear();
      this.b_scheduler = true;
      this.f_scheduler = scheduler;
      return (T)this;
   }

   public void clearScheduler() {
      loadAndClear();
      this.b_scheduler = false;
      this.f_scheduler = null;
   }

   // required string job_id = 2;
   private java.lang.String f_jobId = null;
   private boolean b_jobId;

   public boolean hasJobId() {
      return this.b_jobId;
   }

   public java.lang.String getJobId() {
      return this.f_jobId;
   }

   public T setJobId(java.lang.String jobId) {
      loadAndClear();
      this.b_jobId = true;
      this.f_jobId = jobId;
      return (T)this;
   }

   public void clearJobId() {
      loadAndClear();
      this.b_jobId = false;
      this.f_jobId = null;
   }

   // required int64 execution_time = 3;
   private long f_executionTime = 0;
   private boolean b_executionTime;

   public boolean hasExecutionTime() {
      return this.b_executionTime;
   }

   public long getExecutionTime() {
      return this.f_executionTime;
   }

   public T setExecutionTime(long executionTime) {
      loadAndClear();
      this.b_executionTime = true;
      this.f_executionTime = executionTime;
      return (T)this;
   }

   public void clearExecutionTime() {
      loadAndClear();
      this.b_executionTime = false;
      this.f_executionTime = 0;
   }

   // required int64 next_execution_time = 4;
   private long f_nextExecutionTime = 0;
   private boolean b_nextExecutionTime;

   public boolean hasNextExecutionTime() {
      return this.b_nextExecutionTime;
   }

   public long getNextExecutionTime() {
      return this.f_nextExecutionTime;
   }

   public T setNextExecutionTime(long nextExecutionTime) {
      loadAndClear();
      this.b_nextExecutionTime = true;
      this.f_nextExecutionTime = nextExecutionTime;
      return (T)this;
   }

   public void clearNextExecutionTime() {
      loadAndClear();
      this.b_nextExecutionTime = false;
      this.f_nextExecutionTime = 0;
   }

   // required int32 rescheduled_count = 5;
   private int f_rescheduledCount = 0;
   private boolean b_rescheduledCount;

   public boolean hasRescheduledCount() {
      return this.b_rescheduledCount;
   }

   public int getRescheduledCount() {
      return this.f_rescheduledCount;
   }

   public T setRescheduledCount(int rescheduledCount) {
      loadAndClear();
      this.b_rescheduledCount = true;
      this.f_rescheduledCount = rescheduledCount;
      return (T)this;
   }

   public void clearRescheduledCount() {
      loadAndClear();
      this.b_rescheduledCount = false;
      this.f_rescheduledCount = 0;
   }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy