E - type of referenced objectpublic class ClientAtomicReferenceProxy<E> extends ClientProxy implements IAtomicReference<E>
IAtomicReference.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. | 
| InternalCompletableFuture<E> | alterAndGetAsync(IFunction<E,E> function)Alters the currently stored reference by applying a function on it and gets the result. | 
| InternalCompletableFuture<Void> | alterAsync(IFunction<E,E> function)Alters the currently stored reference by applying a function on it. | 
| <R> R | apply(IFunction<E,R> function)Applies a function on the value, the actual stored value will not change. | 
| <R> InternalCompletableFuture<R> | applyAsync(IFunction<E,R> function)Applies a function on the value, the actual stored value will not change. | 
| void | clear()Clears the current stored reference. | 
| InternalCompletableFuture<Void> | clearAsync()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. | 
| InternalCompletableFuture<Boolean> | compareAndSetAsync(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. | 
| InternalCompletableFuture<Boolean> | containsAsync(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. | 
| InternalCompletableFuture<E> | getAndAlterAsync(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. | 
| InternalCompletableFuture<E> | getAndSetAsync(E newValue)Gets the value and sets the new value. | 
| InternalCompletableFuture<E> | getAsync()Gets the current value. | 
| protected ClientMessage | invokeOnPartition(ClientMessage req) | 
| protected <T> ClientDelegatingFuture<T> | invokeOnPartitionAsync(ClientMessage clientMessage,
                      ClientMessageDecoder clientMessageDecoder) | 
| protected <T> T | invokeOnPartitionInterruptibly(ClientMessage clientMessage) | 
| boolean | isNull()Checks if the stored reference is null. | 
| InternalCompletableFuture<Boolean> | isNullAsync()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. | 
| InternalCompletableFuture<Void> | setAsync(E newValue)Atomically sets the given value. | 
| String | toString() | 
deregisterListener, destroy, equals, getClient, getContext, getDistributedObjectName, getId, getName, getPartitionKey, getSerializationService, getServiceName, hashCode, invoke, invoke, invokeOnPartition, invokeOnPartitionInterruptibly, onDestroy, onShutdown, postDestroy, preDestroy, registerListener, setContext, toData, toObjectclone, finalize, getClass, notify, notifyAll, wait, wait, waitdestroy, getName, getPartitionKey, getServiceNamepublic <R> InternalCompletableFuture<R> applyAsync(IFunction<E,R> function)
IAtomicReferenceapplyAsync in interface IAtomicReference<E>function - the functionpublic <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 InternalCompletableFuture<Void> alterAsync(IFunction<E,E> function)
IAtomicReferencealterAsync in interface IAtomicReference<E>function - the functionpublic void alter(IFunction<E,E> function)
IAtomicReferencealter in interface IAtomicReference<E>function - the function that alters the currently stored referencepublic InternalCompletableFuture<E> alterAndGetAsync(IFunction<E,E> function)
IAtomicReferencealterAndGetAsync in interface IAtomicReference<E>function - the functionpublic E alterAndGet(IFunction<E,E> function)
IAtomicReferencealterAndGet in interface IAtomicReference<E>function - the function that alters the currently stored referencepublic InternalCompletableFuture<E> getAndAlterAsync(IFunction<E,E> function)
IAtomicReferencegetAndAlterAsync in interface IAtomicReference<E>function - the functionpublic E getAndAlter(IFunction<E,E> function)
IAtomicReferencegetAndAlter in interface IAtomicReference<E>function - the function that alters the currently stored referencepublic InternalCompletableFuture<Boolean> compareAndSetAsync(E expect, E update)
IAtomicReference== the expected value.compareAndSetAsync in interface IAtomicReference<E>expect - the expected valueupdate - the new valuepublic boolean compareAndSet(E expect, E update)
IAtomicReference== the expected value.compareAndSet in interface IAtomicReference<E>expect - the expected valueupdate - the new valuepublic InternalCompletableFuture<Boolean> containsAsync(E expected)
IAtomicReferencecontainsAsync in interface IAtomicReference<E>expected - the value to check (is allowed to be null).public boolean contains(E expected)
IAtomicReferencecontains in interface IAtomicReference<E>expected - the value to check (is allowed to be null).public InternalCompletableFuture<E> getAsync()
IAtomicReferencegetAsync in interface IAtomicReference<E>public E get()
IAtomicReferenceget in interface IAtomicReference<E>public InternalCompletableFuture<Void> setAsync(E newValue)
IAtomicReferencesetAsync in interface IAtomicReference<E>newValue - the new valuepublic void set(E newValue)
IAtomicReferenceset in interface IAtomicReference<E>newValue - the new valuepublic InternalCompletableFuture<Void> clearAsync()
IAtomicReferenceclearAsync in interface IAtomicReference<E>public void clear()
IAtomicReferenceclear in interface IAtomicReference<E>public InternalCompletableFuture<E> getAndSetAsync(E newValue)
IAtomicReferencegetAndSetAsync in interface IAtomicReference<E>newValue - the new value.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 InternalCompletableFuture<Boolean> isNullAsync()
IAtomicReferenceisNullAsync in interface IAtomicReference<E>public 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
InterruptedExceptionprotected <T> ClientDelegatingFuture<T> invokeOnPartitionAsync(ClientMessage clientMessage, ClientMessageDecoder clientMessageDecoder)
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.