| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hazelcast.spi.AbstractDistributedObject<AtomicReferenceService>
com.hazelcast.concurrent.atomicreference.AtomicReferenceProxy<E>
public class AtomicReferenceProxy<E>
| Field Summary | 
|---|
| Fields inherited from class com.hazelcast.spi.AbstractDistributedObject | 
|---|
PARTITIONING_STRATEGY | 
| Constructor Summary | |
|---|---|
AtomicReferenceProxy(String name,
                     NodeEngine nodeEngine,
                     AtomicReferenceService service)
 | 
|
| Method Summary | ||
|---|---|---|
 void | 
alter(IFunction<E,E> function)
Alters the currently stored reference by applying a function on it.  | 
|
 E | 
alterAndGet(IFunction<E,E> function)
Alters the currently stored reference by applying a function on it and gets the result.  | 
|
 | 
apply(IFunction<E,R> function)
Applies a function on the value, the actual stored value will not change.  | 
|
 InternalCompletableFuture<Void> | 
asyncAlter(IFunction<E,E> function)
Alters the currently stored reference by applying a function on it.  | 
|
 InternalCompletableFuture<E> | 
asyncAlterAndGet(IFunction<E,E> function)
Alters the currently stored reference by applying a function on it and gets the result.  | 
|
 | 
asyncApply(IFunction<E,R> function)
Applies a function on the value, the actual stored value will not change.  | 
|
 InternalCompletableFuture<Void> | 
asyncClear()
Clears the current stored reference.  | 
|
 InternalCompletableFuture<Boolean> | 
asyncCompareAndSet(E expect,
                   E update)
Atomically sets the value to the given updated value only if the current value == the expected value. | 
|
 InternalCompletableFuture<Boolean> | 
asyncContains(E value)
Checks if the reference contains the value.  | 
|
 InternalCompletableFuture<E> | 
asyncGet()
Gets the current value.  | 
|
 InternalCompletableFuture<E> | 
asyncGetAndAlter(IFunction<E,E> function)
Alters the currently stored reference by applying a function on it on and gets the old value.  | 
|
 InternalCompletableFuture<E> | 
asyncGetAndSet(E newValue)
Gets the value and sets the new value.  | 
|
 InternalCompletableFuture<Boolean> | 
asyncIsNull()
Checks if the stored reference is null.  | 
|
 InternalCompletableFuture<Void> | 
asyncSet(E newValue)
Atomically sets the given value.  | 
|
 InternalCompletableFuture<E> | 
asyncSetAndGet(E update)
Sets and gets the value.  | 
|
 void | 
clear()
Clears the current stored reference.  | 
|
 boolean | 
compareAndSet(E expect,
              E update)
Atomically sets the value to the given updated value only if the current value == the expected value. | 
|
 boolean | 
contains(E expected)
Checks if the reference contains the value.  | 
|
 E | 
get()
Gets the current value.  | 
|
 E | 
getAndAlter(IFunction<E,E> function)
Alters the currently stored reference by applying a function on it on and gets the old value.  | 
|
 E | 
getAndSet(E newValue)
Gets the old value and sets the new value.  | 
|
 String | 
getName()
Returns the unique name for this DistributedObject.  | 
|
 int | 
getPartitionId()
 | 
|
 String | 
getServiceName()
Returns the service name for this object.  | 
|
 boolean | 
isNull()
Checks if the stored reference is null.  | 
|
 void | 
set(E newValue)
Atomically sets the given value.  | 
|
 E | 
setAndGet(E update)
Sets and gets the value.  | 
|
 String | 
toString()
 | 
|
| Methods inherited from class com.hazelcast.spi.AbstractDistributedObject | 
|---|
destroy, equals, getId, getNameAsPartitionAwareData, getNodeEngine, getPartitionKey, getService, hashCode, invalidate, postDestroy, throwNotActiveException | 
| Methods inherited from class java.lang.Object | 
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface com.hazelcast.core.DistributedObject | 
|---|
destroy, getId, getPartitionKey | 
| Constructor Detail | 
|---|
public AtomicReferenceProxy(String name,
                            NodeEngine nodeEngine,
                            AtomicReferenceService service)
| Method Detail | 
|---|
public void alter(IFunction<E,E> function)
IAtomicReference
alter in interface IAtomicReference<E>function - the function that alters the currently stored referencepublic InternalCompletableFuture<Void> asyncAlter(IFunction<E,E> function)
AsyncAtomicReference
asyncAlter in interface AsyncAtomicReference<E>function - the functionpublic E alterAndGet(IFunction<E,E> function)
IAtomicReference
alterAndGet in interface IAtomicReference<E>function - the function that alters the currently stored reference
public InternalCompletableFuture<E> asyncAlterAndGet(IFunction<E,E> function)
AsyncAtomicReference
asyncAlterAndGet in interface AsyncAtomicReference<E>function - the function
public E getAndAlter(IFunction<E,E> function)
IAtomicReference
getAndAlter in interface IAtomicReference<E>function - the function that alters the currently stored reference
public InternalCompletableFuture<E> asyncGetAndAlter(IFunction<E,E> function)
AsyncAtomicReference
asyncGetAndAlter in interface AsyncAtomicReference<E>function - the function
public <R> R apply(IFunction<E,R> function)
IAtomicReference
apply in interface IAtomicReference<E>function - the function applied on the value, the stored value does not change
public <R> InternalCompletableFuture<R> asyncApply(IFunction<E,R> function)
AsyncAtomicReference
asyncApply in interface AsyncAtomicReference<E>function - the function
public void clear()
IAtomicReference
clear in interface IAtomicReference<E>public InternalCompletableFuture<Void> asyncClear()
AsyncAtomicReference
asyncClear in interface AsyncAtomicReference<E>
public boolean compareAndSet(E expect,
                             E update)
IAtomicReference== the expected value.
compareAndSet in interface IAtomicReference<E>expect - the expected valueupdate - the new value
public InternalCompletableFuture<Boolean> asyncCompareAndSet(E expect,
                                                             E update)
AsyncAtomicReference== the expected value.
asyncCompareAndSet in interface AsyncAtomicReference<E>expect - the expected valueupdate - the new value
public E get()
IAtomicReference
get in interface IAtomicReference<E>public InternalCompletableFuture<E> asyncGet()
AsyncAtomicReference
asyncGet in interface AsyncAtomicReference<E>public boolean contains(E expected)
IAtomicReference
contains in interface IAtomicReference<E>expected - the value to check (is allowed to be null).
public InternalCompletableFuture<Boolean> asyncContains(E value)
AsyncAtomicReference
asyncContains in interface AsyncAtomicReference<E>value - the value to check (is allowed to be null).
public void set(E newValue)
IAtomicReference
set in interface IAtomicReference<E>newValue - the new valuepublic InternalCompletableFuture<Void> asyncSet(E newValue)
AsyncAtomicReference
asyncSet in interface AsyncAtomicReference<E>newValue - the new valuepublic E getAndSet(E newValue)
IAtomicReference
getAndSet in interface IAtomicReference<E>newValue - the new value.
public InternalCompletableFuture<E> asyncGetAndSet(E newValue)
AsyncAtomicReference
asyncGetAndSet in interface AsyncAtomicReference<E>newValue - the new value.
public E setAndGet(E update)
IAtomicReference
setAndGet in interface IAtomicReference<E>update - the new value
public InternalCompletableFuture<E> asyncSetAndGet(E update)
AsyncAtomicReference
asyncSetAndGet in interface AsyncAtomicReference<E>update - the new value
public boolean isNull()
IAtomicReference
isNull in interface IAtomicReference<E>public InternalCompletableFuture<Boolean> asyncIsNull()
AsyncAtomicReference
asyncIsNull in interface AsyncAtomicReference<E>public String getName()
DistributedObject
getName in interface DistributedObjectpublic int getPartitionId()
public String getServiceName()
DistributedObject
getServiceName in interface DistributedObjectgetServiceName in class AbstractDistributedObject<AtomicReferenceService>public String toString()
toString in class AbstractDistributedObject<AtomicReferenceService>
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||