Class SynchronizedAttributeAccessor
java.lang.Object
org.springframework.batch.repeat.context.SynchronizedAttributeAccessor
- All Implemented Interfaces:
- org.springframework.core.AttributeAccessor
- Direct Known Subclasses:
- JobContext,- RepeatContextSupport,- StepContext
public class SynchronizedAttributeAccessor
extends Object
implements org.springframework.core.AttributeAccessor
An 
AttributeAccessor that synchronizes on a mutex (not this) before modifying
 or accessing the underlying attributes.- Author:
- Dave Syer
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionString[]boolean@Nullable ObjectgetAttribute(String name) booleanhasAttribute(String name) inthashCode()@Nullable ObjectremoveAttribute(String name) voidsetAttribute(String name, @Nullable Object value) @Nullable ObjectsetAttributeIfAbsent(String name, Object value) Additional support for atomic put if absent.toString()Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.core.AttributeAccessorcomputeAttribute
- 
Constructor Details- 
SynchronizedAttributeAccessorpublic SynchronizedAttributeAccessor()
 
- 
- 
Method Details- 
attributeNames- Specified by:
- attributeNamesin interface- org.springframework.core.AttributeAccessor
 
- 
equals
- 
getAttribute- Specified by:
- getAttributein interface- org.springframework.core.AttributeAccessor
 
- 
hasAttribute- Specified by:
- hasAttributein interface- org.springframework.core.AttributeAccessor
 
- 
hashCodepublic int hashCode()
- 
removeAttribute- Specified by:
- removeAttributein interface- org.springframework.core.AttributeAccessor
 
- 
setAttribute- Specified by:
- setAttributein interface- org.springframework.core.AttributeAccessor
 
- 
setAttributeIfAbsentAdditional support for atomic put if absent.- Parameters:
- name- the key for the attribute name
- value- the value of the attribute
- Returns:
- null if the attribute was not already set, the existing value otherwise.
 
- 
toString
 
-