T
- type of the queue elements.public class HeapPriorityQueueSnapshotRestoreWrapper<T extends HeapPriorityQueueElement> extends Object implements StateSnapshotRestore
Constructor and Description |
---|
HeapPriorityQueueSnapshotRestoreWrapper(HeapPriorityQueueSet<T> priorityQueue,
RegisteredPriorityQueueStateBackendMetaInfo<T> metaInfo,
KeyExtractorFunction<T> keyExtractorFunction,
KeyGroupRange localKeyGroupRange,
int totalKeyGroups) |
Modifier and Type | Method and Description |
---|---|
HeapPriorityQueueSnapshotRestoreWrapper<T> |
forUpdatedSerializer(TypeSerializer<T> updatedSerializer)
Returns a deep copy of the snapshot, where the serializer is changed to the given serializer.
|
HeapPriorityQueueSnapshotRestoreWrapper<T> |
forUpdatedSerializer(TypeSerializer<T> updatedSerializer,
boolean allowFutureMetadataUpdates)
Returns a deep copy of the snapshot, where the serializer is re-registered by the serializer
snapshot or changed to the given serializer.
|
RegisteredPriorityQueueStateBackendMetaInfo<T> |
getMetaInfo() |
HeapPriorityQueueSet<T> |
getPriorityQueue() |
StateSnapshotKeyGroupReader |
keyGroupReader(int readVersionHint)
This method returns a
StateSnapshotKeyGroupReader that can be used to restore the
state on a per-key-group basis. |
HeapPriorityQueueStateSnapshot<T> |
stateSnapshot()
Returns a snapshot of the state.
|
public HeapPriorityQueueSnapshotRestoreWrapper(@Nonnull HeapPriorityQueueSet<T> priorityQueue, @Nonnull RegisteredPriorityQueueStateBackendMetaInfo<T> metaInfo, @Nonnull KeyExtractorFunction<T> keyExtractorFunction, @Nonnull KeyGroupRange localKeyGroupRange, int totalKeyGroups)
@Nonnull public HeapPriorityQueueStateSnapshot<T> stateSnapshot()
StateSnapshotRestore
stateSnapshot
in interface StateSnapshotRestore
@Nonnull public StateSnapshotKeyGroupReader keyGroupReader(int readVersionHint)
StateSnapshotRestore
StateSnapshotKeyGroupReader
that can be used to restore the
state on a per-key-group basis. This method tries to return a reader for the given version
hint.keyGroupReader
in interface StateSnapshotRestore
readVersionHint
- the required version of the state to read.@Nonnull public HeapPriorityQueueSet<T> getPriorityQueue()
@Nonnull public RegisteredPriorityQueueStateBackendMetaInfo<T> getMetaInfo()
public HeapPriorityQueueSnapshotRestoreWrapper<T> forUpdatedSerializer(@Nonnull TypeSerializer<T> updatedSerializer)
public HeapPriorityQueueSnapshotRestoreWrapper<T> forUpdatedSerializer(@Nonnull TypeSerializer<T> updatedSerializer, boolean allowFutureMetadataUpdates)
updatedSerializer
- updated serializer.allowFutureMetadataUpdates
- whether allow metadata to update in the future or not.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.