Package 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 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
  Description
  `SynchronizedAttributeAccessor()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String[]`
  `attributeNames()`
  `boolean`
  `equals(Object other)`
  `Object`
  `getAttribute(String name)`
  `boolean`
  `hasAttribute(String name)`
  `int`
  `hashCode()`
  `Object`
  `removeAttribute(String name)`
  `void`
  `setAttribute(String name, Object value)`
  `Object`
  `setAttributeIfAbsent(String name, Object value)`
  Additional support for atomic put if absent.
  `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 Details

  - ### SynchronizedAttributeAccessor

    public SynchronizedAttributeAccessor()

- ## Method Details

  - ### attributeNames

    public String[] attributeNames()
    Specified by:
      `attributeNames` in interface `org.springframework.core.AttributeAccessor`

  - ### equals

    public boolean equals(Object other)
    Overrides:
      `equals` in class `Object`

  - ### getAttribute

    public Object getAttribute(String name)
    Specified by:
      `getAttribute` in interface `org.springframework.core.AttributeAccessor`

  - ### hasAttribute

    public boolean hasAttribute(String name)
    Specified by:
      `hasAttribute` in interface `org.springframework.core.AttributeAccessor`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### removeAttribute

    public Object removeAttribute(String name)
    Specified by:
      `removeAttribute` in interface `org.springframework.core.AttributeAccessor`

  - ### setAttribute

    public void setAttribute(String name, Object value)
    Specified by:
      `setAttribute` in interface `org.springframework.core.AttributeAccessor`

  - ### setAttributeIfAbsent

    public Object setAttributeIfAbsent(String name, 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 String toString()
    Overrides:
      `toString` in class `Object`