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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]booleangetAttribute(String name) booleanhasAttribute(String name) inthashCode()removeAttribute(String name) voidsetAttribute(String name, Object value) setAttributeIfAbsent(String name, Object value) Additional support for atomic put if absent.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.core.AttributeAccessor
computeAttribute
-
Constructor Details
-
SynchronizedAttributeAccessor
public SynchronizedAttributeAccessor()
-
-
Method Details
-
attributeNames
- Specified by:
attributeNamesin interfaceorg.springframework.core.AttributeAccessor
-
equals
-
getAttribute
- Specified by:
getAttributein interfaceorg.springframework.core.AttributeAccessor
-
hasAttribute
- Specified by:
hasAttributein interfaceorg.springframework.core.AttributeAccessor
-
hashCode
public int hashCode() -
removeAttribute
- Specified by:
removeAttributein interfaceorg.springframework.core.AttributeAccessor
-
setAttribute
- Specified by:
setAttributein interfaceorg.springframework.core.AttributeAccessor
-
setAttributeIfAbsent
Additional support for atomic put if absent.- Parameters:
name- the key for the attribute namevalue- the value of the attribute- Returns:
- null if the attribute was not already set, the existing value otherwise.
-
toString
-