V
- The result value type. This would be Void unless the request
indicated that values
are to be
returned, in which case this would be the value class requested.public static interface Topics.FetchResult<V>
A fetch operation is issued using a fetch request
which will return a result of this type via a CompletableFuture
.
Modifier and Type | Interface and Description |
---|---|
static interface |
Topics.FetchResult.TopicResult<V>
Encapsulates the result of a
fetch invocation for a single selected topic. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasMore()
Indicates whether the fetch could have returned more results if it
had not been constrained by the
first ,
last or
maximumResultSize limits. |
boolean |
isEmpty()
Returns
true if the result contains zero elements. |
List<Topics.FetchResult.TopicResult<V>> |
results()
Returns the results from the fetch operation.
|
int |
size()
The number of elements in the fetch result.
|
List<Topics.FetchResult.TopicResult<V>> results()
Results are always returned in path order.
boolean hasMore()
first
,
last
or
maximumResultSize
limits.
A fetch that requests no results can be used together with this
method to query whether there are topics that match the selector
provided to Topics.FetchRequest.fetch(com.pushtechnology.diffusion.client.topics.TopicSelector)
, without retrieving the
details of any of the topics.
For example:
topics.fetchRequest().first(0).fetch("?x//").thenAccept(fetchResult -> {
if (fetchResult.hasMore()) {
System.out.println("There are topics in branch 'x'.");
}
}
int size()
boolean isEmpty()
true
if the result contains zero elements.Copyright © 2024 DiffusionData Ltd. All Rights Reserved.