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 sourcenamespace- stable host namespace, independent of artifact incarnation and network addresslease- positive native lease duration,2seconds..1dayrenewEvery- renewal delay, at least1ms and at most one quarter of the leaseoperationBudget- per-operation cap,1ms..25seconds and at most one quarter of the leasecleanupBudget- separate bounded cancellation budget,1ms..25seconds; never used for business effectsmaximumEffects- 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 Summary
ConstructorsConstructorDescriptionManagedOwnershipProfile(ManagedOwnershipBackend backend, String namespace, Duration lease, Duration renewEvery, Duration operationBudget, Duration cleanupBudget) Uses the default bound of64 retained protected-effect identities for one invocation.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. -
Method Summary
Modifier and TypeMethodDescriptionbackend()Returns the value of thebackendrecord component.Returns the value of thecleanupBudgetrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.lease()Returns the value of theleaserecord component.intReturns the value of themaximumEffectsrecord component.Returns the value of thenamespacerecord component.Returns the value of theoperationBudgetrecord component.Returns the value of therenewEveryrecord component.toString()Omits endpoint and namespace details from incidental diagnostics.
-
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 sourcenamespace- stable host namespacelease- finite leaserenewEvery- renewal delayoperationBudget- original-budget-clamped native operation capcleanupBudget- 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 backendnamespace- stable bounded host namespacelease- native expiry durationrenewEvery- bounded renewal delayoperationBudget- original-budget-clamped operation capcleanupBudget- bounded cleanup-only budgetmaximumEffects- distinct retained effects,1..1024- Throws:
IllegalArgumentException- for invalid namespace or timingNullPointerException- for null backend
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
backend
-
namespace
-
lease
-
renewEvery
Returns the value of therenewEveryrecord component.- Returns:
- the value of the
renewEveryrecord component
-
operationBudget
Returns the value of theoperationBudgetrecord component.- Returns:
- the value of the
operationBudgetrecord component
-
cleanupBudget
Returns the value of thecleanupBudgetrecord component.- Returns:
- the value of the
cleanupBudgetrecord component
-
maximumEffects
public int maximumEffects()Returns the value of themaximumEffectsrecord component.- Returns:
- the value of the
maximumEffectsrecord component
-