ClassProgressionModule

public final class ClassProgressionModule

Thread-safe cache and domain Module for [Alpha] Advanced Combat System progression.

All store access runs through one serial executor. Reads, awards and selections use only immutable catalog data and the loaded cache, so gameplay callers never perform JDBC work.

Constructors

Link copied to clipboard
public void ClassProgressionModule(ClassCatalog catalog, FoundationLevels foundationLevels, ClassProgressionStore store)
Creates a Module with its own daemon persistence thread.
public void ClassProgressionModule(ClassCatalog catalog, FoundationLevels foundationLevels, ClassProgressionStore store, ClassContentAvailability contentAvailability)
public void ClassProgressionModule(ClassCatalog catalog, FoundationLevels foundationLevels, ClassProgressionStore store, Executor persistenceExecutor)
Creates a Module over a supplied asynchronous executor; calls are serialized even if it is a pool.
public void ClassProgressionModule(ClassCatalog catalog, FoundationLevels foundationLevels, ClassProgressionStore store, Executor persistenceExecutor, ClassContentAvailability contentAvailability)

Functions

Link copied to clipboard
public Optional<RunSelection> activeRunSelection(UUID playerId)
Link copied to clipboard
public AwardResult award(UUID playerId, long requestedXp)
Awards the selected form, or the memory-locked run form when one exists.
Link copied to clipboard
public static ClassProgressionModule builtIn(FoundationLevels foundationLevels, ClassProgressionStore store)
public static ClassProgressionModule builtIn(FoundationLevels foundationLevels, ClassProgressionStore store, Executor persistenceExecutor)
Link copied to clipboard
public boolean canChallenge(UUID playerId, String formId)
Eligibility excludes only this form's trial, never its parent's requirements.
Link copied to clipboard
public SelectionResult clearSelectedForm(UUID playerId)
Link copied to clipboard
public synchronized CompletableFuture<Void> closeAsync()
Link copied to clipboard
public boolean completeChallenge(UUID playerId, String formId)
Unlocks and selects the form after the owning trial's instructor actually dies.
Link copied to clipboard
public Optional<Throwable> failure(UUID playerId)
Link copied to clipboard
public CompletableFuture<Void> flush()
Completes after every operation submitted before this call has left the store boundary.
public CompletableFuture<Void> flush(UUID playerId)
Same global ordering barrier, additionally surfacing this player's recorded failure.
Link copied to clipboard
public ClassProgressionForgetResult forgetForAdministration(UUID playerId, String formId)
Revokes a form and all descendants, preserving its ancestors and sibling branches.
Link copied to clipboard
public boolean isReady(UUID playerId)
Link copied to clipboard
public CompletableFuture<ProfileSnapshot> load(UUID playerId)
Loads, validates and publishes one player's complete profile without blocking the caller.
Link copied to clipboard
public RunLockResult lockRun(UUID playerId, UUID runId)
Locks the selected class and its controls for this run.
Link copied to clipboard
public ProgressionReadiness readiness(UUID playerId)
Link copied to clipboard
public Optional<SkillTutorialProgress> recordTutorialSkill(UUID playerId, AbilitySlot slot)
Records a successful cast once, using the same ordered persistence queue as class selections.
Link copied to clipboard
public Optional<RunSelection> runSelection(UUID playerId, UUID runId)
Link copied to clipboard
public SelectionResult selectForm(UUID playerId, String formId)
Link copied to clipboard
public SelectionResult selectInputProfile(UUID playerId, InputProfile inputProfile)
Link copied to clipboard
public int setAllLineagesForAdministration(UUID playerId, int effectiveLevel)
Permission-gated tester fixture backing /em loot debug: scales every class tree to one effective level.
Link copied to clipboard
public ClassProgressionSetResult setLineageForAdministration(UUID playerId, String formId, int effectiveLevel)
Permission-gated tester fixture: completes every ancestor band, sets the requested form to an exact visible level, and selects it.
Link copied to clipboard
public Optional<ProfileSnapshot> snapshot(UUID playerId)
Returns an immutable current view only after successful hydration.
Link copied to clipboard
public Optional<SkillTutorialProgress> tutorialProgress(UUID playerId)
Link copied to clipboard
public void unload(UUID playerId)
Drops loaded profile state.
Link copied to clipboard
public boolean unlockRun(UUID playerId, UUID runId)
A stale run token cannot clear a newer instance's lock.