E
- journal event typepublic interface EventJournalReader<E>
Modifier and Type | Method and Description |
---|---|
<T> ICompletableFuture<ReadResultSet<T>> |
readFromEventJournal(long startSequence,
int minSize,
int maxSize,
int partitionId,
Predicate<? super E> predicate,
Projection<? super E,? extends T> projection)
Reads from the event journal.
|
ICompletableFuture<EventJournalInitialSubscriberState> |
subscribeToEventJournal(int partitionId)
Subscribe to the event journal for this reader and a specific partition ID.
|
ICompletableFuture<EventJournalInitialSubscriberState> subscribeToEventJournal(int partitionId)
partitionId
- the partition ID of the entries to which we are subscribingUnsupportedOperationException
- if the cluster version is lower than 3.9 or there is no event journal
configured for this data structure<T> ICompletableFuture<ReadResultSet<T>> readFromEventJournal(long startSequence, int minSize, int maxSize, int partitionId, Predicate<? super E> predicate, Projection<? super E,? extends T> projection)
UnsupportedOperationException
if the cluster version is lower than 3.9 or there is no event journal configured for this data structure.
NOTE:
Configuring evictions may cause unexpected results when reading from the event journal and
there are cluster changes (a backup replica is promoted into a partition owner). See
MapEventJournal
or
CacheEventJournal
for more details.
T
- the return type of the projection. It is equal to the journal event type
if the projection is null
or it is the identity projectionstartSequence
- the sequence of the first item to readmaxSize
- the maximum number of items to readpartitionId
- the partition ID of the entries in the journalpredicate
- the predicate which the events must pass to be included in the response.
May be null
in which case all events pass the predicateprojection
- the projection which is applied to the events before returning.
May be null
in which case the event is returned without being projectedIllegalArgumentException
- if maxSize
is less than minSize
Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.