Class ManagedOwnershipContext
java.lang.Object
org.j7m.middleware.application.distributed.ManagedOwnershipContext
Actual per-claim capability supplied only through an ownership provider in its owned CALL.
It never rebinds to a new owner. Every effect is a native FENCED mutation in the lease resource;
arbitrary SQL, files, Java callbacks and external RPC are outside this protection. Its protected
data namespace includes the trusted tenant and shard, so application keys cannot escape it.
-
Method Summary
Modifier and TypeMethodDescriptionlongfence()Returns the current acquired/renewed token only inside the owning USER work.longReturns the native lease's acquisition/renewal epoch.longReturns the pinned partition epoch, or zero for an explicitly fixed non-migrating group.org.j7m.middleware.distributed.ReplicatedResources.ValueReads a fresh quorum snapshot from this context's protected namespace.booleanrevoked()Reports local revocation, not a remote proof of current ownership.toString()Omits tenant, keys, owner, values and token details from incidental diagnostics.longWrites String data through the same resource's atomic native FENCED operation.
-
Method Details
-
revoked
public boolean revoked()Reports local revocation, not a remote proof of current ownership. Native effects always validate their fence and epoch independently. Checking this flag never renews a lease.- Returns:
- true after loss, cancellation, budget expiry or cleanup
-
fence
public long fence()Returns the current acquired/renewed token only inside the owning USER work.- Returns:
- snapshot fence; not authorization for arbitrary external effects
- Throws:
org.j7m.middleware.api.MiddlewareException- outside the owning invocation or after revocation
-
leadershipEpoch
public long leadershipEpoch()Returns the native lease's acquisition/renewal epoch.- Returns:
- historical native lease epoch
- Throws:
org.j7m.middleware.api.MiddlewareException- outside the owning invocation or after revocation
-
partitionEpoch
public long partitionEpoch()Returns the pinned partition epoch, or zero for an explicitly fixed non-migrating group.- Returns:
- immutable claim session epoch; it never follows handoff
- Throws:
org.j7m.middleware.api.MiddlewareException- outside the owning invocation or after revocation
-
write
Writes String data through the same resource's atomic native FENCED operation. Keys are restricted to this authenticated tenant/shard namespace. Reusing an effect identity with different arguments fails; a lost response is UNKNOWN and never authorizes body replay.- Parameters:
effectId- stable identity within this claim,1..512 characters without NULkey- application key,1..512 characters without NULvalue- non-null String, at most4096 UTF16 units; code units round-trip without normalization- Returns:
- committed native version, not fresh ownership authority
- Throws:
org.j7m.middleware.api.MiddlewareException- on revocation, native rejection, permission, uncertain I/O or host effect-capacity exhaustionIllegalArgumentException- for invalid data bounds or effect-identity conflict
-
read
Reads a fresh quorum snapshot from this context's protected namespace. This is not an atomic transaction with a separate effect and does not replace the fence check on every write.- Parameters:
key- application key,1..512 characters without NUL- Returns:
- decoded String/native version, or null when absent
- Throws:
org.j7m.middleware.api.MiddlewareException- after revocation, permission denial, invalid frame or uncertain I/OIllegalArgumentException- for invalid key
-
toString
-