public class JobDataMap extends HashMap<String,Object> implements Serializable
Job instances.
JobDataMap instances are stored once when the Job is added to a scheduler. They are also re-persisted after every
execution of StatefulJob instances.
JobDataMap instances can also be stored with a Trigger. This can be useful in the case where you have a Job that is
stored in the scheduler for regular/repeated use by multiple Triggers, yet with each independent triggering, you want to supply the Job with
different data inputs.
The JobExecutionContext passed to a Job at execution time also contains a convenience JobDataMap that is the result of
merging the contents of the trigger's JobDataMap (if any) over the Job's JobDataMap (if any).
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
JobDataMap()
Create an empty
JobDataMap. |
JobDataMap(JobDataMap jobDataMap)
Constructor - creates a shallow copy of the passed in JobDataMap
|
| Modifier and Type | Method and Description |
|---|---|
String |
getString(String key)
Retrieve the identified
String value from the JobDataMap. |
JobDataMap |
shallowCopy() |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesequals, hashCode, toStringpublic JobDataMap()
Create an empty JobDataMap.
public JobDataMap(JobDataMap jobDataMap)
jobDataMap - public String getString(String key)
Retrieve the identified String value from the JobDataMap.
ClassCastException - if the identified object is not a String.public JobDataMap shallowCopy()
Copyright © 2011–2017 Knowm Inc.. All rights reserved.