You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: org.springframework.context.support/src/main/java/org/springframework/scheduling/quartz/JobDetailFactoryBean.java
+24-1Lines changed: 24 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2002-2011 the original author or authors.
2
+
* Copyright 2002-2012 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -60,6 +60,10 @@ public class JobDetailFactoryBean
60
60
61
61
privateJobDataMapjobDataMap = newJobDataMap();
62
62
63
+
privatebooleandurability = false;
64
+
65
+
privateStringdescription;
66
+
63
67
privateStringbeanName;
64
68
65
69
privateApplicationContextapplicationContext;
@@ -120,6 +124,21 @@ public void setJobDataAsMap(Map<String, ?> jobDataAsMap) {
120
124
getJobDataMap().putAll(jobDataAsMap);
121
125
}
122
126
127
+
/**
128
+
* Specify the job's durability, i.e. whether it should remain stored
129
+
* in the job store even if no triggers point to it anymore.
130
+
*/
131
+
publicvoidsetDurability(booleandurability) {
132
+
this.durability = durability;
133
+
}
134
+
135
+
/**
136
+
* Set a textual description for this job.
137
+
*/
138
+
publicvoidsetDescription(Stringdescription) {
139
+
this.description = description;
140
+
}
141
+
123
142
publicvoidsetBeanName(StringbeanName) {
124
143
this.beanName = beanName;
125
144
}
@@ -172,6 +191,8 @@ public void afterPropertiesSet() {
172
191
jdi.setGroup(this.group);
173
192
jdi.setJobClass(this.jobClass);
174
193
jdi.setJobDataMap(this.jobDataMap);
194
+
jdi.setDurability(this.durability);
195
+
jdi.setDescription(this.description);
175
196
this.jobDetail = jdi;
176
197
*/
177
198
@@ -188,6 +209,8 @@ public void afterPropertiesSet() {
0 commit comments