Record Class AgentPusherTurn

java.lang.Object
java.lang.Record
io.meeds.chat.model.AgentPusherTurn
Record Components:
leftKind - true when the account left an account kind's group: the turn then re-reads whether the account still wants a pusher, and no later turn of the same account replaces it
decidedAt - when the calling thread found the account wanted a pusher; null for a turn that re-reads it
matrixId - the account's Matrix id as the calling thread read it, which its request may not have committed yet; null for a turn that re-reads it

public record AgentPusherTurn(boolean leftKind, Instant decidedAt, String matrixId) extends Record
A pending reconcile turn of one account's pusher and push rules, queued by a platform listener.
  • Constructor Details

    • AgentPusherTurn

      public AgentPusherTurn(boolean leftKind, Instant decidedAt, String matrixId)
      Creates an instance of a AgentPusherTurn record class.
      Parameters:
      leftKind - the value for the leftKind record component
      decidedAt - the value for the decidedAt record component
      matrixId - the value for the matrixId record component
  • Method Details

    • desired

      public static AgentPusherTurn desired(Instant decidedAt, String matrixId)
      A turn whose calling thread found the account wanted a pusher.
      Parameters:
      decidedAt - when it decided
      matrixId - the account's Matrix id as the calling thread read it
      Returns:
      the turn
    • leftKindTurn

      public static AgentPusherTurn leftKindTurn()
      A turn of an account that left an account kind's group.
      Returns:
      the turn
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • leftKind

      public boolean leftKind()
      Returns the value of the leftKind record component.
      Returns:
      the value of the leftKind record component
    • decidedAt

      public Instant decidedAt()
      Returns the value of the decidedAt record component.
      Returns:
      the value of the decidedAt record component
    • matrixId

      public String matrixId()
      Returns the value of the matrixId record component.
      Returns:
      the value of the matrixId record component