E- journal event type
public interface EventJournalReader<E>
|Modifier and Type||Method and Description|
Reads from the event journal.
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 subscribing
UnsupportedOperationException- 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,T> projection)
UnsupportedOperationExceptionif the cluster version is lower than 3.9 or there is no event journal configured for this data structure.
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
CacheEventJournal for more details.
T- the return type of the projection. It is equal to the journal event type if the projection is
nullor it is the identity projection
startSequence- the sequence of the first item to read
maxSize- the maximum number of items to read
partitionId- the partition ID of the entries in the journal
predicate- the predicate which the events must pass to be included in the response. May be
nullin which case all events pass the predicate
projection- the projection which is applied to the events before returning. May be
nullin which case the event is returned without being projected
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.