Class ManagedJobClient
java.lang.Object
org.j7m.middleware.application.distributed.ManagedJobClient
- All Implemented Interfaces:
AutoCloseable
Host-selected typed durable job producer and query facade, without worker credentials or claims.
Its exact profile/namespace/program is selected by trusted setup, never by an application name
lookup. Public status is authoritative native state; local cancellation is not physical completion.
-
Method Summary
Modifier and TypeMethodDescriptionorg.j7m.middleware.distributed.ExecutionResultDurably cancels native work and fences its prior owner; this is not Java task termination.<T> Tcheckpoint(String logical, Class<T> type, Instant deadline) Reads the last confirmed checkpoint without observing live Java heap state.voidclose()Revokes this producer/query facade without closing borrowed endpoints or running workers.<T> TReads the last confirmed progress hook value bound to the run's durable version.org.j7m.middleware.distributed.ReplicatedResources.ValuereadProtected(String key, Instant deadline) Reads a protected value in the same fixed host namespace as job staged effects.<T> TReads the declared typed terminal result; no app exception or stack is deserialized.org.j7m.middleware.distributed.ExecutionResultReads durable logical status and its monotonically increasing native run version.org.j7m.middleware.distributed.ExecutionResultDurably submits one stable logical occurrence with the first caller's trace carrier.toString()Omits namespace, identities and input data.
-
Method Details
-
submit
public org.j7m.middleware.distributed.ExecutionResult submit(String logical, Object input, Instant deadline) throws IOException Durably submits one stable logical occurrence with the first caller's trace carrier.- Parameters:
logical- stable application occurrence identity, at most512 UTF16 code unitsinput- data of the declared input typedeadline- original submission deadline, not the background handler's execution budget- Returns:
- READY, CONFLICT or explicit native capacity outcome
- Throws:
IOException- if submission outcome is unavailable or UNKNOWNIllegalArgumentException- for malformed identity, input or bounded envelope
-
cancel
public org.j7m.middleware.distributed.ExecutionResult cancel(String logical, Instant deadline) throws IOException Durably cancels native work and fences its prior owner; this is not Java task termination. The cooperative context observes revocation through native renewal/checkpoint fencing.- Parameters:
logical- stable occurrence identitydeadline- original cancellation operation deadline- Returns:
- CANCELLED or ALREADY_COMPLETED, never proof of physical handler exit
- Throws:
IOException- if cancellation outcome is unavailable or UNKNOWN
-
status
public org.j7m.middleware.distributed.ExecutionResult status(String logical, Instant deadline) throws IOException Reads durable logical status and its monotonically increasing native run version.- Parameters:
logical- stable occurrence identitydeadline- original read deadline- Returns:
- durable status; a committed failed outcome is FAILED, with authorized native metadata
- Throws:
IOException- if the current quorum is unavailable
-
result
Reads the declared typed terminal result; no app exception or stack is deserialized.- Type Parameters:
T- expected result type- Parameters:
logical- stable occurrence identitytype- exact declared result type, primitive boxing alloweddeadline- original read deadline- Returns:
- persisted result, possibly null for a void entry
- Throws:
IOException- if quorum is unavailableIllegalStateException- if not terminal or the durable logical outcome is failedIllegalArgumentException- for incompatible type or frame
-
checkpoint
Reads the last confirmed checkpoint without observing live Java heap state.- Type Parameters:
T- checkpoint type- Parameters:
logical- stable occurrence identitytype- exact declared checkpoint reference typedeadline- original read deadline- Returns:
- persisted state, or null before any checkpoint
- Throws:
IOException- if quorum is unavailableIllegalArgumentException- for incompatible type or frame
-
progress
Reads the last confirmed progress hook value bound to the run's durable version.- Type Parameters:
T- progress type- Parameters:
logical- stable occurrence identitytype- exact declared progress reference typedeadline- original read deadline- Returns:
- persisted progress, or null before any progress capture
- Throws:
IOException- if quorum is unavailableIllegalArgumentException- for incompatible type or frame
-
readProtected
public org.j7m.middleware.distributed.ReplicatedResources.Value readProtected(String key, Instant deadline) throws IOException Reads a protected value in the same fixed host namespace as job staged effects.- Parameters:
key- logical identifier,1..128 ASCII identifier charactersdeadline- original read deadline- Returns:
- immutable native value/version, or null
- Throws:
IOException- if quorum is unavailableIllegalArgumentException- for malformed key
-
close
public void close()Revokes this producer/query facade without closing borrowed endpoints or running workers.- Specified by:
closein interfaceAutoCloseable
-
toString
-