private void doReschedule(final String jobId, long executionTime, long nextExecutionTime, int rescheduledCount) throws IOException { KahaRescheduleJobCommand update = new KahaRescheduleJobCommand(); update.setScheduler(name); update.setJobId(jobId); update.setExecutionTime(executionTime); update.setNextExecutionTime(nextExecutionTime); update.setRescheduledCount(rescheduledCount); this.store.store(update); }
final List<JobLocation> current = this.index.remove(tx, command.getExecutionTime()); if (current != null) { for (int i = 0; i < current.size(); i++) { JobLocation jl = current.get(i); if (jl.getJobId().equals(command.getJobId())) { current.remove(i); if (!current.isEmpty()) { this.index.put(tx, command.getExecutionTime(), current); command.getJobId(), command.getExecutionTime()); result.setNextTime(command.getNextExecutionTime()); result.setLastUpdate(location); result.setRescheduledCount(command.getRescheduledCount()); if (!result.isCron() && result.getRepeat() > 0) { result.setRepeat(result.getRepeat() - 1); if (this.index.containsKey(tx, command.getNextExecutionTime())) { target = this.index.remove(tx, command.getNextExecutionTime()); this.index.put(tx, command.getNextExecutionTime(), target); this.scheduleTime.newJob(); } else { LOG.debug("Process reschedule command for non-scheduled job {} at executime time {}.", command.getJobId(), command.getExecutionTime());
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 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 static KahaRescheduleJobCommand parseUnframed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { return new KahaRescheduleJobCommand().mergeUnframed(data).checktInitialized(); }
public static KahaRescheduleJobCommand parseFramed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { return new KahaRescheduleJobCommand().mergeFramed(data).checktInitialized(); }
public void clear() { super.clear(); clearScheduler(); clearJobId(); clearExecutionTime(); clearNextExecutionTime(); clearRescheduledCount(); }
public KahaRescheduleJobCommand clone() { return new KahaRescheduleJobCommand().mergeFrom(this); }
public boolean equals(Object obj) { if( obj==this ) return true; if( obj==null || obj.getClass()!=KahaRescheduleJobCommand.class ) return false; return equals((KahaRescheduleJobCommand)obj); }
return new KahaAddScheduledJobCommand(); case KAHA_RESCHEDULE_JOB_COMMAND: return new KahaRescheduleJobCommand(); case KAHA_REMOVE_SCHEDULED_JOB_COMMAND: return new KahaRemoveScheduledJobCommand();
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 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 static KahaRescheduleJobCommand parseUnframed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { return new KahaRescheduleJobCommand().mergeUnframed(data).checktInitialized(); }
public static KahaRescheduleJobCommand parseFramed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { return new KahaRescheduleJobCommand().mergeFramed(data).checktInitialized(); }
public void clear() { super.clear(); clearScheduler(); clearJobId(); clearExecutionTime(); clearNextExecutionTime(); clearRescheduledCount(); }
public KahaRescheduleJobCommand clone() { return new KahaRescheduleJobCommand().mergeFrom(this); }
public boolean equals(Object obj) { if( obj==this ) return true; if( obj==null || obj.getClass()!=KahaRescheduleJobCommand.class ) return false; return equals((KahaRescheduleJobCommand)obj); }
return new KahaAddScheduledJobCommand(); case KAHA_RESCHEDULE_JOB_COMMAND: return new KahaRescheduleJobCommand(); case KAHA_REMOVE_SCHEDULED_JOB_COMMAND: return new KahaRemoveScheduledJobCommand();
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 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; }