本文整理了Java中org.quartz.Trigger.getGroup()
方法的一些代码示例,展示了Trigger.getGroup()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Trigger.getGroup()
方法的具体详情如下:
包路径:org.quartz.Trigger
类名称:Trigger
方法名:getGroup
[英]Get the group of this Trigger
.
[中]获取此Trigger
的组。
代码示例来源:origin: javamelody/javamelody
boolean isTriggerPaused(Trigger trigger, Scheduler scheduler) throws SchedulerException {
return scheduler.getTriggerState(trigger.getName(),
trigger.getGroup()) == Trigger.STATE_PAUSED;
}
代码示例来源:origin: net.bull.javamelody/javamelody-core
boolean isTriggerPaused(Trigger trigger, Scheduler scheduler) throws SchedulerException {
return scheduler.getTriggerState(trigger.getName(),
trigger.getGroup()) == Trigger.STATE_PAUSED;
}
代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz
public Key getKey() {
if(key == null) {
key = new Key(getName(), getGroup());
}
return key;
}
代码示例来源:origin: net.sourceforge.kivu4j/utils-job
@Override
public void rescheduleJob(Trigger oldTrg, Trigger newTrg) {
Assert.notNull(oldTrg, "'oldTrg' must not be null");
Assert.notNull(newTrg, "'newTrigger' must not be null");
try {
logger.info("reschedule trigger " + newTrg.getFullName());
this.scheduler.rescheduleJob(oldTrg.getName(), oldTrg.getGroup(), newTrg);
} catch (SchedulerException e) {
throw new JobException(e);
}
}
代码示例来源:origin: net.sourceforge.kivu4j.utils/kivu4j-utils-job
@Override
public void rescheduleJob(Trigger oldTrg, Trigger newTrg) {
Assert.notNull(oldTrg, "'oldTrg' must not be null");
Assert.notNull(newTrg, "'newTrigger' must not be null");
try {
logger.info("reschedule trigger " + newTrg.getFullName());
this.scheduler.rescheduleJob(oldTrg.getName(), oldTrg.getGroup(), newTrg);
} catch (SchedulerException e) {
throw new JobException(e);
}
}
代码示例来源:origin: pl.edu.icm.sedno/sedno-tools
public void pauseTrigger(String triggerName) {
try {
getScheduler().pauseTrigger(triggerName, getTrigger(triggerName).getGroup());
}catch (SchedulerException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: pl.edu.icm.sedno/sedno-tools
public void resumeTrigger(String triggerName) {
try {
getScheduler().resumeTrigger(triggerName, getTrigger(triggerName).getGroup());
}catch (SchedulerException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: pl.edu.icm.sedno/sedno-tools
private int getTriggerState(Trigger trigger) {
try {
return getScheduler().getTriggerState(trigger.getName(), trigger.getGroup());
}catch (SchedulerException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: org.apache.camel/camel-quartz
public void pauseJob(Trigger trigger) throws SchedulerException {
if (isClustered()) {
// do not pause jobs which are clustered, as we want the jobs to continue running on the other nodes
LOG.debug("Cannot pause job using trigger: {}/{} as the JobStore is clustered.", trigger.getGroup(), trigger.getName());
} else {
LOG.debug("Pausing job using trigger: {}/{}", trigger.getGroup(), trigger.getName());
getScheduler().pauseTrigger(trigger.getName(), trigger.getGroup());
getScheduler().pauseJob(trigger.getName(), trigger.getGroup());
}
// only decrement job counter if we are successful
decrementJobCounter(getScheduler());
}
代码示例来源:origin: quartz/quartz-all
public void execute(Connection conn) throws JobPersistenceException {
Trigger[] triggers = getTriggersForJob(conn, ctxt, jobName, groupName);
for (int j = 0; j < triggers.length; j++) {
pauseTrigger(conn, ctxt, triggers[j].getName(), triggers[j].getGroup());
}
}
});
代码示例来源:origin: quartz/quartz-all
public void execute(Connection conn) throws JobPersistenceException {
Trigger[] triggers = getTriggersForJob(conn, ctxt, jobName, groupName);
for (int j = 0; j < triggers.length; j++) {
resumeTrigger(conn, ctxt, triggers[j].getName(), triggers[j].getGroup());
}
}
});
代码示例来源:origin: org.apache.camel/camel-quartz
@Override
protected String createEndpointUri() {
return "quartz://" + getTrigger().getGroup() + "/" + getTrigger().getName();
}
代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz
public void execute(Connection conn) throws JobPersistenceException {
Trigger[] triggers = getTriggersForJob(conn, ctxt, jobName, groupName);
for (int j = 0; j < triggers.length; j++) {
pauseTrigger(conn, ctxt, triggers[j].getName(), triggers[j].getGroup());
}
}
});
代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz
public void execute(Connection conn) throws JobPersistenceException {
Trigger[] triggers = getTriggersForJob(conn, ctxt, jobName, groupName);
for (int j = 0; j < triggers.length; j++) {
resumeTrigger(conn, ctxt, triggers[j].getName(), triggers[j].getGroup());
}
}
});
代码示例来源:origin: quartz/quartz-all
public void triggerMisfired(Trigger trigger) {
if (!getLog().isInfoEnabled()) {
return;
}
Object[] args = {
trigger.getName(), trigger.getGroup(),
trigger.getPreviousFireTime(), trigger.getNextFireTime(),
new java.util.Date(), trigger.getJobName(),
trigger.getJobGroup()
};
getLog().info(MessageFormat.format(getTriggerMisfiredMessage(), args));
}
代码示例来源:origin: pl.edu.icm.sedno/sedno-tools
public void applyStartupPauseConfig() {
for (Trigger trigger : getAllTriggers()) {
if (shouldBePaused(trigger)) {
try {
getScheduler().pauseTrigger(trigger.getName(), trigger.getGroup());
logger.info(" pausing trigger: "+ trigger.getName());
}catch (SchedulerException e) {
throw new RuntimeException(e);
}
}
}
}
代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz
public void triggerMisfired(Trigger trigger) {
if (!getLog().isInfoEnabled()) {
return;
}
Object[] args = {
trigger.getName(), trigger.getGroup(),
trigger.getPreviousFireTime(), trigger.getNextFireTime(),
new java.util.Date(), trigger.getJobGroup(),
trigger.getJobGroup()
};
getLog().info(MessageFormat.format(getTriggerMisfiredMessage(), args));
}
代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz
public void execute(Connection conn) throws JobPersistenceException {
String[] jobNames = getJobNames(conn, ctxt, groupName);
for (int i = 0; i < jobNames.length; i++) {
Trigger[] triggers = getTriggersForJob(conn, ctxt, jobNames[i], groupName);
for (int j = 0; j < triggers.length; j++) {
resumeTrigger(conn, ctxt, triggers[j].getName(), triggers[j].getGroup());
}
}
}
});
代码示例来源:origin: quartz/quartz-all
public void execute(Connection conn) throws JobPersistenceException {
String[] jobNames = getJobNames(conn, ctxt, groupName);
for (int i = 0; i < jobNames.length; i++) {
Trigger[] triggers = getTriggersForJob(conn, ctxt, jobNames[i], groupName);
for (int j = 0; j < triggers.length; j++) {
pauseTrigger(conn, ctxt, triggers[j].getName(), triggers[j].getGroup());
}
}
}
});
代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz
public void execute(Connection conn) throws JobPersistenceException {
String[] jobNames = getJobNames(conn, ctxt, groupName);
for (int i = 0; i < jobNames.length; i++) {
Trigger[] triggers = getTriggersForJob(conn, ctxt, jobNames[i], groupName);
for (int j = 0; j < triggers.length; j++) {
pauseTrigger(conn, ctxt, triggers[j].getName(), triggers[j].getGroup());
}
}
}
});
内容来源于网络,如有侵权,请联系作者删除!