Record Class ManagedOwnershipProfile

java.lang.Object
java.lang.Record
org.j7m.middleware.application.distributed.ManagedOwnershipProfile
Record Components:
backend - opaque fixed-group or epoch-pinned partition source
namespace - stable host namespace, independent of artifact incarnation and network address
lease - positive native lease duration,2seconds..1day
renewEvery - renewal delay, at least1ms and at most one quarter of the lease
operationBudget - per-operation cap,1ms..25seconds and at most one quarter of the lease
cleanupBudget - separate bounded cancellation budget,1ms..25seconds; never used for business effects
maximumEffects - distinct logical protected writes per invocation,1..1024

public record ManagedOwnershipProfile(ManagedOwnershipBackend backend, String namespace, Duration lease, Duration renewEvery, Duration operationBudget, Duration cleanupBudget, int maximumEffects) extends Record
Immutable trusted ownership configuration; annotations cannot choose endpoints or lease duration. Renewal and effects share one acquired session. The native resource remains the final authority for expiry, fence and partition epoch. Backend handles are borrowed, never closed by a call.
  • Constructor Details

    • ManagedOwnershipProfile

      public ManagedOwnershipProfile(ManagedOwnershipBackend backend, String namespace, Duration lease, Duration renewEvery, Duration operationBudget, Duration cleanupBudget)
      Uses the default bound of64 retained protected-effect identities for one invocation.
      Parameters:
      backend - borrowed native source
      namespace - stable host namespace
      lease - finite lease
      renewEvery - renewal delay
      operationBudget - original-budget-clamped native operation cap
      cleanupBudget - cleanup-only cap
    • ManagedOwnershipProfile

      public ManagedOwnershipProfile(ManagedOwnershipBackend backend, String namespace, Duration lease, Duration renewEvery, Duration operationBudget, Duration cleanupBudget, int maximumEffects)
      Checks finite timing and namespace constraints without contacting a backend.
      Parameters:
      backend - trusted borrowed backend
      namespace - stable bounded host namespace
      lease - native expiry duration
      renewEvery - bounded renewal delay
      operationBudget - original-budget-clamped operation cap
      cleanupBudget - bounded cleanup-only budget
      maximumEffects - distinct retained effects,1..1024
      Throws:
      IllegalArgumentException - for invalid namespace or timing
      NullPointerException - for null backend
  • Method Details

    • toString

      public String toString()
      Omits endpoint and namespace details from incidental diagnostics.
      Specified by:
      toString in class Record
      Returns:
      fixed redacted label
    • 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.
    • backend

      public ManagedOwnershipBackend backend()
      Returns the value of the backend record component.
      Returns:
      the value of the backend record component
    • namespace

      public String namespace()
      Returns the value of the namespace record component.
      Returns:
      the value of the namespace record component
    • lease

      public Duration lease()
      Returns the value of the lease record component.
      Returns:
      the value of the lease record component
    • renewEvery

      public Duration renewEvery()
      Returns the value of the renewEvery record component.
      Returns:
      the value of the renewEvery record component
    • operationBudget

      public Duration operationBudget()
      Returns the value of the operationBudget record component.
      Returns:
      the value of the operationBudget record component
    • cleanupBudget

      public Duration cleanupBudget()
      Returns the value of the cleanupBudget record component.
      Returns:
      the value of the cleanupBudget record component
    • maximumEffects

      public int maximumEffects()
      Returns the value of the maximumEffects record component.
      Returns:
      the value of the maximumEffects record component