public class RemoteReference<E> extends AbstractStatelessClient<ReferenceHandler.EventId> implements Reference<E>
| Modifier and Type | Field and Description |
|---|---|
protected Map<Object,Long> |
subscribersToTid |
csp, hub| Constructor and Description |
|---|
RemoteReference(RequestContext requestContext,
Asset asset) |
RemoteReference(TcpChannelHub hub,
Class<E> messageClass,
String fullName) |
| Modifier and Type | Method and Description |
|---|---|
<T,R> R |
applyTo(net.openhft.chronicle.core.util.SerializableBiFunction<E,T,R> function,
T argument)
Apply a function which takes an argument.
|
<R> R |
applyTo(net.openhft.chronicle.core.util.SerializableFunction<E,R> function)
Apply a function to the visitable and return the result.
|
<T> void |
asyncUpdate(net.openhft.chronicle.core.util.SerializableBiFunction<E,T,E> updateFunction,
T argument)
Apply a function to visitable potentially asynchronously.
|
void |
asyncUpdate(net.openhft.chronicle.core.util.SerializableFunction<E,E> updateFunction)
Apply a function to visitable potentially asynchronously.
|
E |
get() |
E |
getAndRemove()
Remove the topic/key and return the old value
|
E |
getAndSet(E e)
Set a new value and return the old value.
|
void |
registerSubscriber(boolean bootstrap,
Subscriber subscriber)
Add a subscription to this spepcific topic
|
void |
remove()
Remove the topic/key
|
void |
set(E event)
Set the new value
|
int |
subscriberCount() |
<UT,RT,R> R |
syncUpdate(net.openhft.chronicle.core.util.SerializableBiFunction<E,UT,E> updateFunction,
UT updateArgument,
net.openhft.chronicle.core.util.SerializableBiFunction<E,RT,R> returnFunction,
RT returnArgument)
Apply a function to update the state of a visible, and apply a function to return a result object synchronously.
|
<R> R |
syncUpdate(net.openhft.chronicle.core.util.SerializableFunction<E,E> updateFunction,
net.openhft.chronicle.core.util.SerializableFunction<E,R> returnFunction)
Apply a function to update the state of a visible, and apply a function to return a result object synchronously.
|
void |
unregisterSubscriber(Subscriber<E> subscriber)
Remove a subscriber
|
checkIsData, close, proxyReturnBoolean, proxyReturnBooleanWithArgs, proxyReturnBooleanWithSequence, proxyReturnByte, proxyReturnByte, proxyReturnInt, proxyReturnLong, proxyReturnTypedObject, proxyReturnUint16, proxyReturnVoid, proxyReturnVoid, proxyReturnWireConsumer, proxyReturnWireConsumerInOut, readBoolean, readInt, readReply, readReplyConsumer, sendEvent, sendEventAsync, sendEventAsyncWithoutLock, toParameters, writeAsyncMetaData, writeMetaDataForKnownTID, writeMetaDataStartTimepublic RemoteReference(RequestContext requestContext, Asset asset)
public RemoteReference(TcpChannelHub hub, Class<E> messageClass, String fullName) throws AssetNotFoundException
AssetNotFoundExceptionpublic E get()
public E getAndSet(E e)
Referencepublic void remove()
Referencepublic E getAndRemove()
ReferencegetAndRemove in interface Reference<E>public void unregisterSubscriber(Subscriber<E> subscriber)
PublisherunregisterSubscriber in interface Publisher<E>subscriber - to removepublic int subscriberCount()
subscriberCount in interface Publisher<E>public void registerSubscriber(boolean bootstrap,
@NotNull
Subscriber subscriber)
throws AssetNotFoundException
PublisherregisterSubscriber in interface Publisher<E>bootstrap - to bootstrapsubscriber - to registerAssetNotFoundException - if the topic no longer exists.public <R> R applyTo(@NotNull
net.openhft.chronicle.core.util.SerializableFunction<E,R> function)
Visitablepublic void asyncUpdate(@NotNull
net.openhft.chronicle.core.util.SerializableFunction<E,E> updateFunction)
VisitableasyncUpdate in interface Visitable<E>updateFunction - to update the state of the visitiable.public <R> R syncUpdate(@NotNull
net.openhft.chronicle.core.util.SerializableFunction<E,E> updateFunction,
@NotNull
net.openhft.chronicle.core.util.SerializableFunction<E,R> returnFunction)
VisitablesyncUpdate in interface Visitable<E>R - data type to return.updateFunction - update to apply to the value.returnFunction - derive an object to returnpublic <T,R> R applyTo(@NotNull
net.openhft.chronicle.core.util.SerializableBiFunction<E,T,R> function,
T argument)
Visitablepublic <T> void asyncUpdate(@NotNull
net.openhft.chronicle.core.util.SerializableBiFunction<E,T,E> updateFunction,
T argument)
VisitableasyncUpdate in interface Visitable<E>T - type of the argumentupdateFunction - to update the state of the visitiable.argument - for the functions use.public <UT,RT,R> R syncUpdate(@NotNull
net.openhft.chronicle.core.util.SerializableBiFunction<E,UT,E> updateFunction,
@Nullable
UT updateArgument,
@NotNull
net.openhft.chronicle.core.util.SerializableBiFunction<E,RT,R> returnFunction,
@Nullable
RT returnArgument)
VisitablesyncUpdate in interface Visitable<E>R - data type to return.updateFunction - update to apply to the value.updateArgument - for the update function to use.returnFunction - derive an object to returnreturnArgument - for the return value function to useCopyright © 2015. All rights reserved.