Record Class NuggetIntrospection.ProviderContext

java.lang.Object
java.lang.Record
org.j7m.middleware.operations.api.NuggetIntrospection.ProviderContext
Record Components:
correlationId - safe correlation id
requestedAt - request timestamp
deadlineAt - provider deadline
Enclosing class:
NuggetIntrospection

public static record NuggetIntrospection.ProviderContext(String correlationId, Instant requestedAt, Instant deadlineAt) extends Record
Bounded execution context passed to read-only introspection providers.

The context carries only safe request metadata. Providers must return immutable snapshots and must not retain the context. The deadline is a local best-effort deadline for provider work; the runtime may cancel or ignore late provider results after it expires.

  • Constructor Details

    • ProviderContext

      public ProviderContext(String correlationId, Instant requestedAt, Instant deadlineAt)
      Creates a safe immutable context.
  • Method Details

    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • correlationId

      public String correlationId()
      Returns the value of the correlationId record component.
      Returns:
      the value of the correlationId record component
    • requestedAt

      public Instant requestedAt()
      Returns the value of the requestedAt record component.
      Returns:
      the value of the requestedAt record component
    • deadlineAt

      public Instant deadlineAt()
      Returns the value of the deadlineAt record component.
      Returns:
      the value of the deadlineAt record component