public final class RemoteQueueView<T,M> extends RemoteTopicPublisher<T,M> implements QueueView<T,M>
QueueView.Excerpt<T,M>, QueueView.Tailer<T,M>
Constructor and Description |
---|
RemoteQueueView(@NotNull RequestContext requestContext,
@NotNull Asset asset) |
Modifier and Type | Method and Description |
---|---|
@NotNull Asset |
asset() |
QueueView.Excerpt<T,M> |
excerpt(long index)
|
QueueView.Excerpt<T,M> |
next(long index)
Returns the
QueueView.Excerpt immediately following the Excerpt at a given index or null if no such Excerpt exists. |
@Nullable QueueView.Excerpt<T,M> |
next(T topic)
Returns the next unread message from the tailer with the provided
topic or null if no such Excerpt exists. |
long |
publishAndIndex(T topic,
M message)
Publish the given
message to the provided topic . |
@Nullable Object |
underlying() |
publish, publisher, registerSubscriber, registerTopicSubscriber, unregisterSubscriber, unregisterTopicSubscriber
attempt, performClose, proxyReturnBoolean, proxyReturnBooleanWithArgs, proxyReturnBooleanWithSequence, proxyReturnByte, proxyReturnByte, proxyReturnInt, proxyReturnInt, proxyReturnLong, proxyReturnLongWithArgs, proxyReturnTypedObject, proxyReturnTypedObject, proxyReturnTypedObject, proxyReturnUint16, proxyReturnVoid, proxyReturnVoid, proxyReturnWireConsumer, proxyReturnWireConsumerInOut, proxyReturnWireTypedObject, readBoolean, readInt, sendBytes, sendEvent, sendEventAsync, toParameters, toParameters, writeMetaDataForKnownTID
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
publish, publisher, registerSubscriber, registerTopicSubscriber, registerTopicSubscriber, unregisterSubscriber, unregisterTopicSubscriber
close, closeQuietly, closeQuietly, notifyClosing, warnAndCloseIfNotClosed
public RemoteQueueView(@NotNull @NotNull RequestContext requestContext, @NotNull @NotNull Asset asset)
public QueueView.Excerpt<T,M> excerpt(long index)
QueueView
QueueView.Excerpt
at a given index
or null
if no such Excerpt exists.
If the provided index
is 0, then the excerpt at the first index is returned
If the index is not a valid index, the operation is undefined.
The Excerpt object returned may be reused between invocations of methods provided by a QueueView.
excerpt
in interface QueueView<T,M>
index
- the address of the exceptQueueView.Excerpt
at a given index or null
if no such Excerpt existspublic QueueView.Excerpt<T,M> next(long index)
QueueView
QueueView.Excerpt
immediately following the Excerpt at a given index
or null
if no such Excerpt exists. This method
is useful for continuously reading Excerpts in an environment where the client can switch between several servers.
In other words, assuming that the queue has not rolled, returns an excerpt who's index is the provided index
+ 1
If the provided index
is 0, then the excerpt at the second index is returned
If the index is not a valid index, the operation is undefined.
The Excerpt object returned may be reused between invocations of methods provided by a QueueView.
next
in interface QueueView<T,M>
index
- the address of a previous except for which the next Excerpt is to be retrievedQueueView.Excerpt
immediately following the Excerpt at a given index or null
if no such Excerpt exists@Nullable public @Nullable QueueView.Excerpt<T,M> next(T topic)
QueueView
topic
or null
if no such Excerpt exists.
The Excerpt object returned may be reused between invocations of methods provided by a QueueView.
public long publishAndIndex(@NotNull T topic, @Nullable M message)
QueueView
message
to the provided topic
.publishAndIndex
in interface QueueView<T,M>
topic
- to publish tomessage
- to publish.@NotNull public @NotNull Asset asset()
@Nullable public @Nullable Object underlying()
underlying
in interface Assetted<Object>
Copyright © 2021. All rights reserved.