Package org.apache.flink.state.changelog
Class ChangelogKeyGroupedPriorityQueue<T>
- java.lang.Object
-
- org.apache.flink.state.changelog.ChangelogKeyGroupedPriorityQueue<T>
-
- All Implemented Interfaces:
org.apache.flink.runtime.state.InternalPriorityQueue<T>,org.apache.flink.runtime.state.KeyGroupedInternalPriorityQueue<T>,ChangelogState
public class ChangelogKeyGroupedPriorityQueue<T> extends Object implements org.apache.flink.runtime.state.KeyGroupedInternalPriorityQueue<T>, ChangelogState
AKeyGroupedInternalPriorityQueuethat keeps state on the underlying delegatedKeyGroupedInternalPriorityQueueas well as on the state change log.
-
-
Constructor Summary
Constructors Constructor Description ChangelogKeyGroupedPriorityQueue(org.apache.flink.runtime.state.KeyGroupedInternalPriorityQueue<T> delegatedPriorityQueue, StateChangeLogger<T,Void> logger, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T toAdd)voidaddAll(Collection<? extends T> toAdd)StateChangeAppliergetChangeApplier(ChangelogApplierFactory factory)StateChangeLogger<T,Void>getStateChangeLogger()Set<T>getSubsetForKeyGroup(int keyGroupId)booleanisEmpty()org.apache.flink.util.CloseableIterator<T>iterator()Tpeek()Tpoll()booleanremove(T toRemove)voidresetWritingMetaFlag()Enable logging meta data before next writes.<IS> voidsetDelegatedState(IS state)intsize()
-
-
-
Constructor Detail
-
ChangelogKeyGroupedPriorityQueue
public ChangelogKeyGroupedPriorityQueue(org.apache.flink.runtime.state.KeyGroupedInternalPriorityQueue<T> delegatedPriorityQueue, StateChangeLogger<T,Void> logger, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
-
-
Method Detail
-
getSubsetForKeyGroup
public Set<T> getSubsetForKeyGroup(int keyGroupId)
- Specified by:
getSubsetForKeyGroupin interfaceorg.apache.flink.runtime.state.KeyGroupedInternalPriorityQueue<T>
-
poll
@Nullable public T poll()
- Specified by:
pollin interfaceorg.apache.flink.runtime.state.InternalPriorityQueue<T>
-
peek
@Nullable public T peek()
- Specified by:
peekin interfaceorg.apache.flink.runtime.state.InternalPriorityQueue<T>
-
add
public boolean add(T toAdd)
- Specified by:
addin interfaceorg.apache.flink.runtime.state.InternalPriorityQueue<T>
-
remove
public boolean remove(T toRemove)
- Specified by:
removein interfaceorg.apache.flink.runtime.state.InternalPriorityQueue<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.apache.flink.runtime.state.InternalPriorityQueue<T>
-
size
public int size()
- Specified by:
sizein interfaceorg.apache.flink.runtime.state.InternalPriorityQueue<T>
-
addAll
public void addAll(@Nullable Collection<? extends T> toAdd)
- Specified by:
addAllin interfaceorg.apache.flink.runtime.state.InternalPriorityQueue<T>
-
iterator
@Nonnull public org.apache.flink.util.CloseableIterator<T> iterator()
- Specified by:
iteratorin interfaceorg.apache.flink.runtime.state.InternalPriorityQueue<T>
-
getChangeApplier
public StateChangeApplier getChangeApplier(ChangelogApplierFactory factory)
- Specified by:
getChangeApplierin interfaceChangelogState
-
setDelegatedState
public <IS> void setDelegatedState(IS state)
- Specified by:
setDelegatedStatein interfaceChangelogState
-
getStateChangeLogger
public StateChangeLogger<T,Void> getStateChangeLogger()
-
resetWritingMetaFlag
public void resetWritingMetaFlag()
Description copied from interface:ChangelogStateEnable logging meta data before next writes.- Specified by:
resetWritingMetaFlagin interfaceChangelogState
-
-