Package velox.api.layer1.messages
Class Layer1ApiTimeFreeze
java.lang.Object
velox.api.layer1.messages.Layer1ApiTimeFreeze
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
FieldsModifier and TypeFieldDescriptionfinal longFallback to prevent eternal freezefinal Class<?> Source of the freeze. -
Constructor Summary
ConstructorsConstructorDescriptionLayer1ApiTimeFreeze(long maxFreezeTimeNs, Class<?> owner) Create new freeze request. -
Method Summary
Modifier and TypeMethodDescriptionvoidStart fallback expiration countdown.booleanReturns true if resumed manually or automatically aftermaxFreezeTimeNs.voidresume()Resume event flow.toString()
-
Field Details
-
maxFreezeTimeNs
public final long maxFreezeTimeNsFallback to prevent eternal freeze -
owner
Source of the freeze. Helpful to understand who is responsible for not lifting freeze in time
-
-
Constructor Details
-
Layer1ApiTimeFreeze
Create new freeze request. Should be sent viaLayer1ApiAdminListener.onUserMessage(Object)and then lifted viaresume(). If not lifted in time, will be lifted automatically aftermaxFreezeTimeNs- Parameters:
maxFreezeTimeNs- seemaxFreezeTimeNsowner- seeowner
-
-
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 aftermaxFreezeTimeNs. -
toString
-