Class ManagedPartitionFactory
java.lang.Object
org.j7m.middleware.application.distributed.ManagedPartitionFactory
- All Implemented Interfaces:
AutoCloseable, org.j7m.middleware.application.components.ManagedHostedResources.Factory
public final class ManagedPartitionFactory
extends Object
implements org.j7m.middleware.application.components.ManagedHostedResources.Factory, AutoCloseable
Trusted finite host adapter registering real replicated encoded POJO partitions.
Install this factory explicitly under hosted kind partition. It does not grant applications
topology authority or raw native handles. Pure reducer callbacks do not enter RPC policies or
transactions; they must be deterministic and effect-free. Only exact program/schema/configuration
restarts are supported. Drain waits for actual native apply and resource work before releasing
the borrowed reducer or its classloader. This factory is thread-safe and owns bounded close workers.
-
Constructor Summary
ConstructorsConstructorDescriptionManagedPartitionFactory(Map<String, ManagedPartitionProfile> profiles) Snapshots finite host-approved partition policies without opening storage or starting code. -
Method Summary
Modifier and TypeMethodDescriptionReturns finite local bound addresses for trusted host discovery and native status probes.Set<Class<? extends Annotation>> Returns the pure reducer backend capability, independent of hosted invocation callbacks.org.j7m.middleware.application.components.ManagedHostedResources.Bindingbind(org.j7m.middleware.application.api.ManagedHostedFeature feature, org.j7m.middleware.application.api.ManagedComponentDefinition<?> definition, Object component, org.j7m.middleware.application.components.ManagedHostedResources.Bundle bundle, org.j7m.middleware.application.components.ManagedHostedResources.Invoker invoker) Creates one exclusive local resource lifecycle; prepare performs actual durable recovery.voidclose()Refuses to discard active resources and releases idle host workers only after all drains.voidvalidate(org.j7m.middleware.application.api.ManagedHostedFeature feature, org.j7m.middleware.application.api.ManagedComponentDefinition<?> definition, org.j7m.middleware.application.components.ManagedHostedResources.Bundle bundle) Validates exact descriptor, pure component and schema types before component construction.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.j7m.middleware.application.components.ManagedHostedResources.Factory
requiredPolicies
-
Constructor Details
-
ManagedPartitionFactory
Snapshots finite host-approved partition policies without opening storage or starting code.- Parameters:
profiles- policy names to immutable local profiles,1..64 entries- Throws:
IllegalArgumentException- for invalid names, duplicate resource directories or capacity
-
-
Method Details
-
backendKinds
-
annotationTypes
- Specified by:
annotationTypesin interfaceorg.j7m.middleware.application.components.ManagedHostedResources.Factory
-
validate
public void validate(org.j7m.middleware.application.api.ManagedHostedFeature feature, org.j7m.middleware.application.api.ManagedComponentDefinition<?> definition, org.j7m.middleware.application.components.ManagedHostedResources.Bundle bundle) Validates exact descriptor, pure component and schema types before component construction.- Specified by:
validatein interfaceorg.j7m.middleware.application.components.ManagedHostedResources.Factory- Parameters:
feature- finite generated declarationdefinition- direct generated programbundle- verified whole-artifact identity and semantic configuration- Throws:
IllegalArgumentException- for an unsupported policy, data model or impure component shape
-
bind
public org.j7m.middleware.application.components.ManagedHostedResources.Binding bind(org.j7m.middleware.application.api.ManagedHostedFeature feature, org.j7m.middleware.application.api.ManagedComponentDefinition<?> definition, Object component, org.j7m.middleware.application.components.ManagedHostedResources.Bundle bundle, org.j7m.middleware.application.components.ManagedHostedResources.Invoker invoker) Creates one exclusive local resource lifecycle; prepare performs actual durable recovery.- Specified by:
bindin interfaceorg.j7m.middleware.application.components.ManagedHostedResources.Factory- Parameters:
feature- validated generated partition declarationdefinition- exact generated definitioncomponent- borrowed stateless reducerbundle- host-verified artifact/configuration snapshotinvoker- trusted shared activation admission guard; never called from replicated apply- Returns:
- owned finite lifecycle
- Throws:
IllegalArgumentException- for unsupported or duplicate registrationIllegalStateException- if this host factory has closed
-
addresses
Returns finite local bound addresses for trusted host discovery and native status probes. This synchronized metadata snapshot is not a readiness, ownership or quorum assertion. Use an authenticated PartitionClient.status with the original deadline for authoritative group/epoch/phase/logical-position evidence. Empty means not prepared or already released. No node mutex, network call or application callback is entered by this method.- Returns:
- immutable resource ID to actual bound address map, at most64 entries
-
close
public void close()Refuses to discard active resources and releases idle host workers only after all drains.- Specified by:
closein interfaceAutoCloseable- Throws:
IllegalStateException- while an owned binding has not actually drained and closed
-