T - the type of the value it holds.public interface Attribute<T>
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareAndSet(T oldValue,
T newValue)
Atomically sets the value to the given updated value if the current value == the expected value.
|
T |
get()
Returns the current value, which may be
null |
T |
getAndSet(T value)
Atomically sets to the given value and returns the old value which may be
null if non was set before. |
void |
remove()
|
void |
set(T value)
Sets the value
|
T |
setIfAbsent(T value)
Atomically sets to the given value if this
Attribute does not contain a value at the moment. |
T get()
nullvoid set(T value)
T getAndSet(T value)
null if non was set before.T setIfAbsent(T value)
Attribute does not contain a value at the moment.
If it was not possible to set the value as it contains a value it will just return the current value.boolean compareAndSet(T oldValue, T newValue)
true otherwise false.void remove()
Copyright © 2008-2013 The Netty Project. All Rights Reserved.