本文整理了Java中org.quartz.Trigger.clearAllTriggerListeners()
方法的一些代码示例,展示了Trigger.clearAllTriggerListeners()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Trigger.clearAllTriggerListeners()
方法的具体详情如下:
包路径:org.quartz.Trigger
类名称:Trigger
方法名:clearAllTriggerListeners
[英]Remove all TriggerListener
s from the Trigger
.
[中]从Trigger
中删除所有TriggerListener
s。
代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz
protected Trigger retrieveTrigger(Connection conn, String triggerName, String groupName)
throws JobPersistenceException {
try {
Trigger trigger = getDelegate().selectTrigger(conn, triggerName,
groupName);
if (trigger == null) {
return null;
}
// In case Trigger was BLOB, clear out any listeners that might
// have been serialized.
trigger.clearAllTriggerListeners();
String[] listeners = getDelegate().selectTriggerListeners(conn,
triggerName, groupName);
for (int i = 0; i < listeners.length; ++i) {
trigger.addTriggerListener(listeners[i]);
}
return trigger;
} catch (Exception e) {
throw new JobPersistenceException("Couldn't retrieve trigger: "
+ e.getMessage(), e);
}
}
代码示例来源:origin: quartz/quartz-all
protected Trigger retrieveTrigger(Connection conn, String triggerName, String groupName)
throws JobPersistenceException {
try {
Trigger trigger = getDelegate().selectTrigger(conn, triggerName,
groupName);
if (trigger == null) {
return null;
}
// In case Trigger was BLOB, clear out any listeners that might
// have been serialized.
trigger.clearAllTriggerListeners();
String[] listeners = getDelegate().selectTriggerListeners(conn,
triggerName, groupName);
for (int i = 0; i < listeners.length; ++i) {
trigger.addTriggerListener(listeners[i]);
}
return trigger;
} catch (Exception e) {
throw new JobPersistenceException("Couldn't retrieve trigger: "
+ e.getMessage(), e);
}
}
内容来源于网络,如有侵权,请联系作者删除!