Home > yorkie-js-sdk > TimeTicket

TimeTicket class

TimeTicket is a timestamp of the logical clock. Ticket is immutable. It is created by ChangeID.


export declare class TimeTicket 


Method Modifiers Description
after(other)   after returns whether the given ticket was created later.
compare(other)   compare returns an integer comparing two Ticket. The result will be 0 if id==other, -1 if id < other, and +1 if id > other. If the receiver or argument is nil, it would panic at runtime.
equals(other)   equals returns whether the given ticket was created.
getActorID()   getActorID returns actorID.
getAnnotatedString()   getAnnotatedString returns a string containing the meta data of the ticket for debugging purpose.
getDelimiter()   getDelimiter returns delimiter.
getLamportAsString()   getLamportAsString returns the lamport string.
of(lamport, delimiter, actorID) static of creates an instance of Ticket.
setActor(actorID)   setActor creates a new instance of Ticket with the given actorID.
toIDString()   toIDString returns the lamport string for this Ticket.