
com.github.lontime.extquartz.container.UpdateLockJobStoreTX Maven / Gradle / Ivy
package com.github.lontime.extquartz.container;
import org.quartz.SchedulerConfigException;
import org.quartz.impl.jdbcjobstore.JobStoreTX;
import org.quartz.spi.ClassLoadHelper;
import org.quartz.spi.SchedulerSignaler;
/**
* UpdateLockJobStoreTX.
* @author lontime
* @since 1.0
*/
public class UpdateLockJobStoreTX extends JobStoreTX {
private String tablePrefix;
public UpdateLockJobStoreTX() {
super();
}
public UpdateLockJobStoreTX(String tablePrefix) {
super();
this.tablePrefix = tablePrefix;
}
@Override
public void initialize(ClassLoadHelper classLoadHelper, SchedulerSignaler schedSignaler) throws SchedulerConfigException {
super.initialize(classLoadHelper, schedSignaler);
// final UpdateLockRowSemaphore semaphore = new UpdateLockRowSemaphore();
// if (tablePrefix != null) {
// semaphore.setTablePrefix(tablePrefix);
// }
// semaphore.setSchedName(getInstanceName());
// setLockHandler(semaphore);
setLockHandler(new UpdateLockRowExtSemaphore(tablePrefix, getInstanceName()));
if (tablePrefix != null) {
setTablePrefix(tablePrefix);
}
getLog().info("UpdateLockJobStoreTX initialized.");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy