public class ClientAtomicReferenceProxy<E> extends ClientProxy implements IAtomicReference<E>
name| Constructor and Description | 
|---|
| ClientAtomicReferenceProxy(String serviceName,
                          String objectId) | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
| <R> R | apply(IFunction<E,R> function)Applies a function on the value, the actual stored value will not change. | 
| 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. | 
| protected ClientMessage | invokeOnPartition(ClientMessage req) | 
| protected <T> T | invokeOnPartitionInterruptibly(ClientMessage clientMessage) | 
| boolean | isNull()Checks if the stored reference is null. | 
| protected void | onInitialize()Called when proxy is created. | 
| void | set(E newValue)Atomically sets the given value. | 
| E | setAndGet(E update)Sets and gets the value. | 
| String | toString() | 
deregisterListener, destroy, equals, getClient, getContext, getId, getName, getPartitionKey, getServiceName, hashCode, invoke, invoke, invokeOnPartition, invokeOnPartitionInterruptibly, onDestroy, onShutdown, registerListener, setContext, throwExceptionIfNull, toData, toObjectclone, finalize, getClass, notify, notifyAll, wait, wait, waitdestroy, getName, getPartitionKey, getServiceNamepublic <R> R apply(IFunction<E,R> function)
IAtomicReferenceapply in interface IAtomicReference<E>function - the function applied on the value, the stored value does not changepublic void alter(IFunction<E,E> function)
IAtomicReferencealter in interface IAtomicReference<E>function - the function that alters the currently stored referencepublic E alterAndGet(IFunction<E,E> function)
IAtomicReferencealterAndGet in interface IAtomicReference<E>function - the function that alters the currently stored referencepublic E getAndAlter(IFunction<E,E> function)
IAtomicReferencegetAndAlter in interface IAtomicReference<E>function - the function that alters the currently stored referencepublic boolean compareAndSet(E expect, E update)
IAtomicReference== the expected value.compareAndSet in interface IAtomicReference<E>expect - the expected valueupdate - the new valuepublic boolean contains(E expected)
IAtomicReferencecontains in interface IAtomicReference<E>expected - the value to check (is allowed to be null).public E get()
IAtomicReferenceget in interface IAtomicReference<E>public void set(E newValue)
IAtomicReferenceset in interface IAtomicReference<E>newValue - the new valuepublic void clear()
IAtomicReferenceclear in interface IAtomicReference<E>public E getAndSet(E newValue)
IAtomicReferencegetAndSet in interface IAtomicReference<E>newValue - the new value.public E setAndGet(E update)
IAtomicReferencesetAndGet in interface IAtomicReference<E>update - the new valuepublic boolean isNull()
IAtomicReferenceisNull in interface IAtomicReference<E>protected void onInitialize()
ClientProxyonInitialize in class ClientProxyprotected ClientMessage invokeOnPartition(ClientMessage req)
protected <T> T invokeOnPartitionInterruptibly(ClientMessage clientMessage) throws InterruptedException
InterruptedExceptionCopyright © 2015 Hazelcast, Inc.. All Rights Reserved.