Class Layer1ApiTimeFreeze

java.lang.Object
velox.api.layer1.messages.Layer1ApiTimeFreeze

public class Layer1ApiTimeFreeze
extends java.lang.Object
Request to freeze time temporarily. Helpful to send snapshot or other updates that belong to same exact timestamp logically. Can be sent from L0 live module.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    long maxFreezeTimeNs
    Fallback to prevent eternal freeze
    java.lang.Class<?> owner
    Source of the freeze.
  • Constructor Summary

    Constructors 
    Constructor Description
    Layer1ApiTimeFreeze​(long maxFreezeTimeNs, java.lang.Class<?> owner)
    Create new freeze request.
  • Method Summary

    Modifier and Type Method Description
    void beginExpirationCountdown()
    Start fallback expiration countdown.
    boolean isResumed()
    Returns true if resumed manually or automatically after maxFreezeTimeNs.
    void resume()
    Resume event flow.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • maxFreezeTimeNs

      public final long maxFreezeTimeNs
      Fallback to prevent eternal freeze
    • owner

      public final java.lang.Class<?> owner
      Source of the freeze. Helpful to understand who is responsible for not lifting freeze in time
  • Constructor Details

  • Method Details

    • beginExpirationCountdown

      public void beginExpirationCountdown()
      Start fallback expiration countdown. Normally should only be called by bookmap core.
    • resume

      public void resume()
      Resume event flow. Just call this method, no need to send the message again.
    • isResumed

      public boolean isResumed()
      Returns true if resumed manually or automatically after maxFreezeTimeNs.
    • toString

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