Class InMemoryTimerInternalsFactory<K>

  • Type Parameters:
    K - key type
    All Implemented Interfaces:
    org.apache.beam.runners.core.TimerInternalsFactory<K>

    public final class InMemoryTimerInternalsFactory<K>
    extends java.lang.Object
    implements org.apache.beam.runners.core.TimerInternalsFactory<K>
    InMemoryTimerInternalsFactory.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<K,​org.apache.beam.runners.core.InMemoryTimerInternals> getTimerInternalsMap()
      Accessor for timerInternalsMap.
      boolean isEmpty​(org.apache.beam.runners.core.InMemoryTimerInternals timerInternal)
      Helper method to check if timerInternals doesn't have any timers left.
      org.apache.beam.runners.core.TimerInternals.TimerData pollTimer​(org.apache.beam.runners.core.InMemoryTimerInternals timerInternal, org.apache.beam.sdk.state.TimeDomain timeDomain)
      Remove the next eligible timer in timeDomain.
      org.apache.beam.runners.core.TimerInternals timerInternalsForKey​(K key)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • InMemoryTimerInternalsFactory

        public InMemoryTimerInternalsFactory()
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • timerInternalsForKey

        public org.apache.beam.runners.core.TimerInternals timerInternalsForKey​(K key)
        Specified by:
        timerInternalsForKey in interface org.apache.beam.runners.core.TimerInternalsFactory<K>
      • pollTimer

        public org.apache.beam.runners.core.TimerInternals.TimerData pollTimer​(org.apache.beam.runners.core.InMemoryTimerInternals timerInternal,
                                                                               org.apache.beam.sdk.state.TimeDomain timeDomain)
        Remove the next eligible timer in timeDomain.
        Parameters:
        timerInternal - the timer internals.
        timeDomain - the time domain.
        Returns:
        the timer data.
      • getTimerInternalsMap

        public java.util.Map<K,​org.apache.beam.runners.core.InMemoryTimerInternals> getTimerInternalsMap()
        Accessor for timerInternalsMap.
        Returns:
        the timer internals map.
      • isEmpty

        public boolean isEmpty​(org.apache.beam.runners.core.InMemoryTimerInternals timerInternal)
        Helper method to check if timerInternals doesn't have any timers left.
        Parameters:
        timerInternal - the in-memory timer internals.
        Returns:
        whether it is empty or not.