Class 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
    A KeyGroupedInternalPriorityQueue that keeps state on the underlying delegated KeyGroupedInternalPriorityQueue as well as on the state change log.
    • 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:
        getSubsetForKeyGroup in interface org.apache.flink.runtime.state.KeyGroupedInternalPriorityQueue<T>
      • poll

        @Nullable
        public T poll()
        Specified by:
        poll in interface org.apache.flink.runtime.state.InternalPriorityQueue<T>
      • peek

        @Nullable
        public T peek()
        Specified by:
        peek in interface org.apache.flink.runtime.state.InternalPriorityQueue<T>
      • add

        public boolean add​(T toAdd)
        Specified by:
        add in interface org.apache.flink.runtime.state.InternalPriorityQueue<T>
      • remove

        public boolean remove​(T toRemove)
        Specified by:
        remove in interface org.apache.flink.runtime.state.InternalPriorityQueue<T>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface org.apache.flink.runtime.state.InternalPriorityQueue<T>
      • size

        public int size()
        Specified by:
        size in interface org.apache.flink.runtime.state.InternalPriorityQueue<T>
      • addAll

        public void addAll​(@Nullable
                           Collection<? extends T> toAdd)
        Specified by:
        addAll in interface org.apache.flink.runtime.state.InternalPriorityQueue<T>
      • iterator

        @Nonnull
        public org.apache.flink.util.CloseableIterator<T> iterator()
        Specified by:
        iterator in interface org.apache.flink.runtime.state.InternalPriorityQueue<T>