org.springframework.batch.repeat.context

## 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 java.lang.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
    Constructor and Description
    `SynchronizedAttributeAccessor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String[]` | `attributeNames()`
    `boolean` | `equals(java.lang.Object other)`
    `java.lang.Object` | `getAttribute(java.lang.String name)`
    `boolean` | `hasAttribute(java.lang.String name)`
    `int` | `hashCode()`
    `java.lang.Object` | `removeAttribute(java.lang.String name)`
    `void` | `setAttribute(java.lang.String name, java.lang.Object value)`
    `java.lang.Object` | `setAttributeIfAbsent(java.lang.String name, java.lang.Object value)` Additional support for atomic put if absent.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.springframework.core.AttributeAccessor

      `computeAttribute`

- - ### Constructor Detail

    - #### SynchronizedAttributeAccessor

          public SynchronizedAttributeAccessor()

  - ### Method Detail

    - #### attributeNames

          public java.lang.String[] attributeNames()

      Specified by:
        `attributeNames` in interface `org.springframework.core.AttributeAccessor`

    - #### equals

          public boolean equals(java.lang.Object other)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### getAttribute

          public java.lang.Object getAttribute(java.lang.String name)

      Specified by:
        `getAttribute` in interface `org.springframework.core.AttributeAccessor`

    - #### hasAttribute

          public boolean hasAttribute(java.lang.String name)

      Specified by:
        `hasAttribute` in interface `org.springframework.core.AttributeAccessor`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### removeAttribute

          public java.lang.Object removeAttribute(java.lang.String name)

      Specified by:
        `removeAttribute` in interface `org.springframework.core.AttributeAccessor`

    - #### setAttribute

          public void setAttribute(java.lang.String name,
                                   java.lang.Object value)

      Specified by:
        `setAttribute` in interface `org.springframework.core.AttributeAccessor`

    - #### setAttributeIfAbsent

          public java.lang.Object setAttributeIfAbsent(java.lang.String name,
                                                       java.lang.Object value)

      Additional 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

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`