|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hazelcast.client.spi.ClientProxy
com.hazelcast.client.proxy.ClientAtomicReferenceProxy<E>
public class ClientAtomicReferenceProxy<E>
| Constructor Summary | |
|---|---|
ClientAtomicReferenceProxy(String serviceName,
String objectId)
|
|
| 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. |
|
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
|
invoke(ClientRequest req)
|
|
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.client.spi.ClientProxy |
|---|
destroy, equals, getClient, getContext, getId, getName, getPartitionKey, getServiceName, hashCode, invoke, invoke, invokeInterruptibly, listen, listen, onDestroy, onInitialize, onShutdown, setContext, stopListening, throwExceptionIfNull, toData, toObject |
| 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, getName, getPartitionKey, getServiceName |
| Constructor Detail |
|---|
public ClientAtomicReferenceProxy(String serviceName,
String objectId)
| Method Detail |
|---|
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 void alter(IFunction<E,E> function)
IAtomicReference
alter in interface IAtomicReference<E>function - the function that alters the currently stored referencepublic E alterAndGet(IFunction<E,E> function)
IAtomicReference
alterAndGet in interface IAtomicReference<E>function - the function that alters the currently stored reference
public E getAndAlter(IFunction<E,E> function)
IAtomicReference
getAndAlter in interface IAtomicReference<E>function - the function that alters the currently stored reference
public boolean compareAndSet(E expect,
E update)
IAtomicReference== the expected value.
compareAndSet in interface IAtomicReference<E>expect - the expected valueupdate - the new value
public boolean contains(E expected)
IAtomicReference
contains in interface IAtomicReference<E>expected - the value to check (is allowed to be null).
public E get()
IAtomicReference
get in interface IAtomicReference<E>public void set(E newValue)
IAtomicReference
set in interface IAtomicReference<E>newValue - the new valuepublic void clear()
IAtomicReference
clear in interface IAtomicReference<E>public E getAndSet(E newValue)
IAtomicReference
getAndSet in interface IAtomicReference<E>newValue - the new value.
public E setAndGet(E update)
IAtomicReference
setAndGet in interface IAtomicReference<E>update - the new value
public boolean isNull()
IAtomicReference
isNull in interface IAtomicReference<E>protected <T> T invoke(ClientRequest req)
invoke in class ClientProxypublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||