Class ExecutionContextUserSupport
- java.lang.Object
- org.springframework.batch.item.util.ExecutionContextUserSupport
public class ExecutionContextUserSupport extends java.lang.ObjectFacilitates assigning names to objects persisting data inExecutionContextand generating keys forExecutionContextbased on the name.- Author:
- Robert Kasanicky
Constructor Summary
Constructors Constructor Description ExecutionContextUserSupport()ExecutionContextUserSupport(java.lang.String name)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetKey(java.lang.String suffix)Prefix the argument withgetName()to create a unique key that can be safely used to identify data stored inExecutionContext.protected java.lang.StringgetName()voidsetName(java.lang.String name)
Method Detail
getName
protected java.lang.String getName()
- Returns:
- name used to uniquely identify this instance's entries in shared context.
setName
public void setName(java.lang.String name)
- Parameters:
name- unique name used to create execution context keys.
getKey
public java.lang.String getKey(java.lang.String suffix)
Prefix the argument withgetName()to create a unique key that can be safely used to identify data stored inExecutionContext.- Parameters:
suffix-Stringto be used to generate the key.- Returns:
- the key that was generated based on the name and the suffix.