Class BaseBroadcastProcessFunction.ReadOnlyContext

java.lang.Object
org.apache.flink.streaming.api.functions.co.BaseBroadcastProcessFunction.ReadOnlyContext
Direct Known Subclasses:
BroadcastProcessFunction.ReadOnlyContext, KeyedBroadcastProcessFunction.ReadOnlyContext
Enclosing class:
BaseBroadcastProcessFunction

public abstract class BaseBroadcastProcessFunction.ReadOnlyContext extends Object
A context available to the non-broadcasted stream side of a BroadcastConnectedStream.

Apart from the basic functionality of a context, this also allows to get a read-only Iterable over the elements stored in the broadcast state.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract long
    Returns the current processing time.
    abstract long
    Returns the current event-time watermark.
    abstract <K, V> org.apache.flink.api.common.state.ReadOnlyBroadcastState<K,V>
    getBroadcastState(org.apache.flink.api.common.state.MapStateDescriptor<K,V> stateDescriptor)
    Fetches a read-only view of the broadcast state with the specified name.
    abstract <X> void
    output(org.apache.flink.util.OutputTag<X> outputTag, X value)
    Emits a record to the side output identified by the OutputTag.
    abstract Long
    Timestamp of the element currently being processed or timestamp of a firing timer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ReadOnlyContext

      public ReadOnlyContext()
  • Method Details

    • getBroadcastState

      public abstract <K, V> org.apache.flink.api.common.state.ReadOnlyBroadcastState<K,V> getBroadcastState(org.apache.flink.api.common.state.MapStateDescriptor<K,V> stateDescriptor)
      Fetches a read-only view of the broadcast state with the specified name.
      Parameters:
      stateDescriptor - the MapStateDescriptor of the state to be fetched.
      Returns:
      The required read-only view of the broadcast state.
    • timestamp

      public abstract Long timestamp()
      Timestamp of the element currently being processed or timestamp of a firing timer.

      This might be null, depending on the stream's watermark strategy.

    • output

      public abstract <X> void output(org.apache.flink.util.OutputTag<X> outputTag, X value)
      Emits a record to the side output identified by the OutputTag.
      Parameters:
      outputTag - the OutputTag that identifies the side output to emit to.
      value - The record to emit.
    • currentProcessingTime

      public abstract long currentProcessingTime()
      Returns the current processing time.
    • currentWatermark

      public abstract long currentWatermark()
      Returns the current event-time watermark.