Skip to content

Commit

Permalink
Deletion of dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
PragTob committed Jun 24, 2011
1 parent 845b28d commit f533891
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 89 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.jodaengine.eventmanagement.timing;

import javax.annotation.Nonnull;
import javax.xml.stream.events.StartDocument;

import org.jodaengine.eventmanagement.adapter.incoming.IncomingPullAdapter;
import org.jodaengine.exception.AdapterSchedulingException;
Expand All @@ -21,20 +22,6 @@ public interface TimingManager {
void registerJobForIncomingPullAdapter(@Nonnull IncomingPullAdapter inboundPulladapter)
throws AdapterSchedulingException;

// /**
// * Registers a non recurring job. This can be used for intermediate timers.
// *
// * @param configuration
// * the configuration of the event
// * @param token
// * the process token to continue the process afterwards.
// * @throws AdapterSchedulingException
// * the adapter scheduling exception
// * @return the name of the job
// */
// String registerNonRecurringJob(@Nonnull TimerConfiguration configuration, Token token)
// throws AdapterSchedulingException;

/**
* Unregister the given job.
*
Expand All @@ -43,4 +30,8 @@ void registerJobForIncomingPullAdapter(@Nonnull IncomingPullAdapter inboundPulla
*/
void unregisterJobForIncomingPullAdapter(@Nonnull IncomingPullAdapter inboundPulladapter)
throws AdapterSchedulingException;

void start();

void stop();
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class EventManager implements EventService {
*/
private Map<AdapterConfiguration, EventAdapter> eventAdapters;

private QuartzJobManager timingManager;
private TimingManager timingManager;

private ErrorAdapter errorAdapter;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import javax.annotation.Nonnull;

import org.jodaengine.bootstrap.Service;
import org.jodaengine.eventmanagement.adapter.configuration.PullAdapterConfiguration;
import org.jodaengine.eventmanagement.adapter.error.ErrorAdapter;
import org.jodaengine.eventmanagement.adapter.incoming.IncomingPullAdapter;
Expand Down Expand Up @@ -298,37 +299,6 @@ String jobGroupName(@Nonnull PullAdapterConfiguration configuration) {
return String.format("job-group-%s", configuration.getUniqueName());
}

// @Override
// public String registerNonRecurringJob(TimerConfiguration configuration, Token token)
// throws AdapterSchedulingException {
//
// JobDetail jobDetail = new JobDetail(jobName(configuration), jobGroupName(configuration),
// configuration.getScheduledClass());
// JobDataMap data = jobDetail.getJobDataMap();
// data.put(TimingManagerImpl.TOKEN_KEY, token);
//
// Calendar date = new GregorianCalendar();
// date.setTimeInMillis(System.currentTimeMillis() + configuration.getTimeInterval());
//
// Trigger trigger = new SimpleTrigger(triggerName(configuration), date.getTime());
//
// registerJob(jobDetail, trigger);
//
// return jobDetail.getFullName();
//
// }

// @Override
// public void unregisterJob(String jobCompleteName) {

// String[] tmp = jobCompleteName.split("\\.");
// try {
// this.scheduler.deleteJob(tmp[1], tmp[0]);
// } catch (SchedulerException e) {
// e.printStackTrace();
// }
// }

/**
* Getter for {@link QuartzJobManager#runningJobKeyTable}.
*
Expand All @@ -342,36 +312,6 @@ private Map<IncomingPullAdapter, JobKey> getRunningJobKeyTable() {
return runningJobKeyTable;
}

// @Override
// public String registerNonRecurringJob(TimerConfiguration configuration, Token token)
// throws AdapterSchedulingException {
//
// JobDetail jobDetail = new JobDetail(jobName(configuration), jobGroupName(configuration),
// configuration.getScheduledClass());
// JobDataMap data = jobDetail.getJobDataMap();
// data.put(TimingManagerImpl.TOKEN_KEY, token);
//
// Calendar date = new GregorianCalendar();
// date.setTimeInMillis(System.currentTimeMillis() + configuration.getTimeInterval());
//
// Trigger trigger = new SimpleTrigger(triggerName(configuration), date.getTime());
//
// registerJob(jobDetail, trigger);
//
// return jobDetail.getFullName();
//
// }

// @Override
// public void unregisterJob(String jobCompleteName) {

// String[] tmp = jobCompleteName.split("\\.");
// try {
// this.scheduler.deleteJob(tmp[1], tmp[0]);
// } catch (SchedulerException e) {
// e.printStackTrace();
// }
// }

// === testing method ===
/**
Expand All @@ -384,17 +324,4 @@ public int numberOfCurrentRunningJobs() {
return getRunningJobKeyTable().size();
}

// public void emptyScheduler()
// throws SchedulerException {

// String[] groups = scheduler.getJobGroupNames();
// for (String group : groups) {
// String[] jobs = scheduler.getJobNames(group);
// for (String job : jobs) {
// unregisterJob(group + "." + job);
// }
//
// }

// }
}

0 comments on commit f533891

Please sign in to comment.