Class ManagedOwnershipBackend
java.lang.Object
org.j7m.middleware.application.distributed.ManagedOwnershipBackend
Opaque trusted lease-and-sink source. A claim pins one session; an existing context never follows
a new partition owner. Every protected mutation uses native FENCED in the exact resource that owns
its lease. This adapter adds no native protocol and supplies no arbitrary-effect callback.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordBorrowed views of the same physical partition-wrapped resource and authorized scope. -
Method Summary
Modifier and TypeMethodDescriptionstatic ManagedOwnershipBackendgroup(org.j7m.middleware.distributed.ResourceEndpoint endpoint) Borrows a fixed authoritative resource group.static ManagedOwnershipBackendpartition(String partitionId, String authenticatedScope, org.j7m.middleware.distributed.PartitionAdminClient topology, Map<String, ManagedOwnershipBackend.PartitionGroup> groups) Resolves topology only before each new claim, then pins all mutations to that ownership epoch.toString()Omits source and authorization data from incidental diagnostics.
-
Method Details
-
group
public static ManagedOwnershipBackend group(org.j7m.middleware.distributed.ResourceEndpoint endpoint) Borrows a fixed authoritative resource group. Native leader changes within that same group remain supported; migrating partitions must instead use the explicitly pinned partition form. The host must not pass an endpoint that silently switches resource groups.- Parameters:
endpoint- authorized non-migrating group endpoint- Returns:
- opaque borrowed backend, without starting workers or acquiring a lease
- Throws:
NullPointerException- for null endpointIllegalArgumentException- for the known local moving-partition facade
-
partition
public static ManagedOwnershipBackend partition(String partitionId, String authenticatedScope, org.j7m.middleware.distributed.PartitionAdminClient topology, Map<String, ManagedOwnershipBackend.PartitionGroup> groups) Resolves topology only before each new claim, then pins all mutations to that ownership epoch. A frozen/moved group revokes the existing claim rather than replaying its body against a new owner. Both native lease and FENCED commands use the same pinned inner resource and scope.- Parameters:
partitionId- stable partition identityauthenticatedScope- exact native authenticated scope, never taken from application metadatatopology- borrowed authoritative topology read clientgroups- at most64 fixed, authorized matching resource/partition pairs- Returns:
- opaque source supporting new claims after authoritative handoff
- Throws:
IllegalArgumentException- for invalid identities or inventoryNullPointerException- for null collaborators
-
toString
-