public class SynchronizedAttributeAccessor
extends java.lang.Object
implements org.springframework.core.AttributeAccessor
AttributeAccessor
that synchronizes on a mutex (not this) before
modifying or accessing the underlying attributes.Constructor and Description |
---|
SynchronizedAttributeAccessor() |
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() |
public java.lang.String[] attributeNames()
attributeNames
in interface org.springframework.core.AttributeAccessor
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface org.springframework.core.AttributeAccessor
public boolean hasAttribute(java.lang.String name)
hasAttribute
in interface org.springframework.core.AttributeAccessor
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object removeAttribute(java.lang.String name)
removeAttribute
in interface org.springframework.core.AttributeAccessor
public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface org.springframework.core.AttributeAccessor
public java.lang.Object setAttributeIfAbsent(java.lang.String name, java.lang.Object value)
name
- the key for the attribute namevalue
- the value of the attributepublic java.lang.String toString()
toString
in class java.lang.Object