Skip to main content

Layer1ApiTimeFreeze

Package: velox.api.layer1.messages

Type: Class

Inheritance: java.lang.Object รขโ€ โ€™ Layer1ApiTimeFreeze

Descriptionโ€‹

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.

Fieldsโ€‹

maxFreezeTimeNsโ€‹

public final long maxFreezeTimeNs

Fallback to prevent eternal freeze

ownerโ€‹

public final Class<?> owner

Source of the freeze. Helpful to understand who is responsible for not lifting freeze in time

Constructorsโ€‹

Layer1ApiTimeFreezeโ€‹

public Layer1ApiTimeFreeze(long maxFreezeTimeNs, Class<?> owner)

Create new freeze request. Should be sent via Layer1ApiAdminListener.onUserMessage(Object) and then lifted via resume(). If not lifted in time, will be lifted automatically after maxFreezeTimeNs

Parameters:

  • maxFreezeTimeNs - see maxFreezeTimeNs
  • owner - see owner

Methodsโ€‹

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 String toString()

Overrides: toString in class Object