private void doRemoveRange(long start, long end) throws IOException { KahaRemoveScheduledJobsCommand destroy = new KahaRemoveScheduledJobsCommand(); destroy.setScheduler(name); destroy.setStartTime(start); destroy.setEndTime(end); this.store.store(destroy); }
/** * Removes all scheduled jobs within a given time range. * * The method can be used to clear the entire scheduler index by specifying a range that * encompasses all time [0...Long.MAX_VALUE] or a single execution time can be removed by * setting start and end time to the same value. * * @param tx * The transaction under which the index is updated. * @param command * The remove command to process. * @param location * The location of the remove command in the Journal. * * @throws IOException if an error occurs while updating the scheduler index. */ protected void process(final Transaction tx, final KahaRemoveScheduledJobsCommand command, Location location) throws IOException { removeInRange(tx, command.getStartTime(), command.getEndTime(), location); }
public boolean equals(KahaRemoveScheduledJobsCommand obj) { if (hasScheduler() ^ obj.hasScheduler() ) return false; if (hasScheduler() && ( !getScheduler().equals(obj.getScheduler()) )) return false; if (hasStartTime() ^ obj.hasStartTime() ) return false; if (hasStartTime() && ( getStartTime()!=obj.getStartTime() )) return false; if (hasEndTime() ^ obj.hasEndTime() ) return false; if (hasEndTime() && ( getEndTime()!=obj.getEndTime() )) return false; return true; }
public KahaRemoveScheduledJobsCommand mergeFrom(KahaRemoveScheduledJobsCommand other) { if (other.hasScheduler()) { setScheduler(other.getScheduler()); } if (other.hasStartTime()) { setStartTime(other.getStartTime()); } if (other.hasEndTime()) { setEndTime(other.getEndTime()); } return this; }
public static KahaRemoveScheduledJobsCommand parseUnframed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaRemoveScheduledJobsCommand().mergeUnframed(data).checktInitialized(); }
public static KahaRemoveScheduledJobsCommand parseFramed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { return new KahaRemoveScheduledJobsCommand().mergeFramed(data).checktInitialized(); }
public void clear() { super.clear(); clearScheduler(); clearStartTime(); clearEndTime(); }
public java.util.ArrayList<String> missingFields() { java.util.ArrayList<String> missingFields = super.missingFields(); if( !hasScheduler() ) { missingFields.add("scheduler"); } if( !hasStartTime() ) { missingFields.add("start_time"); } if( !hasEndTime() ) { missingFields.add("end_time"); } return missingFields; }
public KahaRemoveScheduledJobsCommand clone() { return new KahaRemoveScheduledJobsCommand().mergeFrom(this); }
public boolean equals(Object obj) { if( obj==this ) return true; if( obj==null || obj.getClass()!=KahaRemoveScheduledJobsCommand.class ) return false; return equals((KahaRemoveScheduledJobsCommand)obj); }
return new KahaRemoveScheduledJobCommand(); case KAHA_REMOVE_SCHEDULED_JOBS_COMMAND: return new KahaRemoveScheduledJobsCommand(); case KAHA_DESTROY_SCHEDULER_COMMAND: return new KahaDestroySchedulerCommand();
public boolean equals(KahaRemoveScheduledJobsCommand obj) { if (hasScheduler() ^ obj.hasScheduler() ) return false; if (hasScheduler() && ( !getScheduler().equals(obj.getScheduler()) )) return false; if (hasStartTime() ^ obj.hasStartTime() ) return false; if (hasStartTime() && ( getStartTime()!=obj.getStartTime() )) return false; if (hasEndTime() ^ obj.hasEndTime() ) return false; if (hasEndTime() && ( getEndTime()!=obj.getEndTime() )) return false; return true; }
public KahaRemoveScheduledJobsCommand mergeFrom(KahaRemoveScheduledJobsCommand other) { if (other.hasScheduler()) { setScheduler(other.getScheduler()); } if (other.hasStartTime()) { setStartTime(other.getStartTime()); } if (other.hasEndTime()) { setEndTime(other.getEndTime()); } return this; }
public static KahaRemoveScheduledJobsCommand parseUnframed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { return new KahaRemoveScheduledJobsCommand().mergeUnframed(data).checktInitialized(); }
public static KahaRemoveScheduledJobsCommand parseFramed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { return new KahaRemoveScheduledJobsCommand().mergeFramed(data).checktInitialized(); }
public void clear() { super.clear(); clearScheduler(); clearStartTime(); clearEndTime(); }
public java.util.ArrayList<String> missingFields() { java.util.ArrayList<String> missingFields = super.missingFields(); if( !hasScheduler() ) { missingFields.add("scheduler"); } if( !hasStartTime() ) { missingFields.add("start_time"); } if( !hasEndTime() ) { missingFields.add("end_time"); } return missingFields; }
public KahaRemoveScheduledJobsCommand clone() { return new KahaRemoveScheduledJobsCommand().mergeFrom(this); }
public boolean equals(Object obj) { if( obj==this ) return true; if( obj==null || obj.getClass()!=KahaRemoveScheduledJobsCommand.class ) return false; return equals((KahaRemoveScheduledJobsCommand)obj); }
return new KahaRemoveScheduledJobCommand(); case KAHA_REMOVE_SCHEDULED_JOBS_COMMAND: return new KahaRemoveScheduledJobsCommand(); case KAHA_DESTROY_SCHEDULER_COMMAND: return new KahaDestroySchedulerCommand();