Uses of Class
com.ultikits.ultitools.utils.ModuleFileTransactions.StageResult
Packages that use ModuleFileTransactions.StageResult
-
Uses of ModuleFileTransactions.StageResult in com.ultikits.ultitools.commands
Methods in com.ultikits.ultitools.commands with parameters of type ModuleFileTransactions.StageResultModifier and TypeMethodDescriptionprivate static booleanPluginInstallCommands.sendStageResult(org.bukkit.command.CommandSender sender, String pluginName, ModuleFileTransactions.StageResult result) Tells the operator what staging an update did (#505): staged to take effect at the next start -- never "updated", which is decided only by what that start observes -- or why nothing was staged. -
Uses of ModuleFileTransactions.StageResult in com.ultikits.ultitools.utils
Fields in com.ultikits.ultitools.utils declared as ModuleFileTransactions.StageResultModifier and TypeFieldDescriptionprivate final ModuleFileTransactions.StageResultModuleFileTransactions.Reservation.refusalMethods in com.ultikits.ultitools.utils that return ModuleFileTransactions.StageResultModifier and TypeMethodDescriptionModuleFileTransactions.checkExisting(ModuleFileTransactions.Record lookup) What an existing record of this module says about staging now, under the lock:nullto go ahead (after discarding aFAILEDrecord, whose failure is left inModuleFileTransactions.lastDiscardedFailure), or the refusal to return.ModuleFileTransactions.download(ModuleFileTransactions.Record record, File work, String identifyString, ModuleFileTransactions.Reservation reservation, ModuleFileTransactions.Catalogue catalogue, ModuleFileTransactions.Downloader downloader, Function<UltiToolsPlugin, String> mainClassOf) The part of staging that touches the network and the staged file, run outside the lock; only the record write at its end takes the lock again.ModuleFileTransactions.existingOutcome(ModuleFileTransactions.Record existing, File existingFile) What a valid existing record of this module means for staging now: an update already waiting, one in progress, one held for the operator (refused until the operator removes the record), or aFAILEDone, discarded -- unless discarding it would touch a file the transaction cannot identify, which holds it for the operator instead.(package private) static ModuleFileTransactions.StageResultModuleFileTransactions.StageResult.failed(String previousFailure, String reasonKey, Object... reasonArgs) (package private) static ModuleFileTransactions.StageResultModuleFileTransactions.StageResult.of(ModuleFileTransactions.StageResult.Outcome outcome, String moduleName, String oldVersion, String newVersion, String previousFailure) ModuleFileTransactions.refuseBeforeDownload(String identifyString, String link, String targetName, ModuleFileTransactions.Reservation reservation, Function<UltiToolsPlugin, String> mainClassOf) The refusals decided once the new JAR's file name is known, before anything is downloaded or written: no download offered, or another copy of the module that would load instead of the new JAR at the next start (maintainer follow-up 19).private static ModuleFileTransactions.StageResultModuleFileTransactions.refuseOtherApiLevel(File work, File staged, String previousFailure) A download must declare anapi-versionthis framework installs: fromModuleApiLevels.MIN_INSTALLABLE_API_LEVELto its own level.private static ModuleFileTransactions.StageResultModuleFileTransactions.refuseOtherVersion(File work, String targetName, String stagedVersion, String latest, String previousFailure) A download must be the version the catalogue offered: a stale or misconfigured endpoint can serve a valid JAR of the same module declaring another version, which would otherwise be recorded -- and committed -- under the offered version's file name (round-6 review).private static ModuleFileTransactions.StageResultModuleFileTransactions.refuseSharedOrAmbiguous(UltiToolsPlugin module, File oldJar, String key, String identifyString, List<UltiToolsPlugin> loaded, Function<UltiToolsPlugin, File> codeSource, String previousFailure) The refusal when the JAR to replace is not the selected module's alone, ornull: another loaded module came from the same JAR, or another loaded module in another JAR declares the same identify-string.ModuleFileTransactions.stageUpdate(String identifyString, Supplier<List<UltiToolsPlugin>> loaded, Function<UltiToolsPlugin, File> codeSource, ModuleFileTransactions.Catalogue catalogue, ModuleFileTransactions.Downloader downloader, Function<UltiToolsPlugin, String> mainClassOf) Stages an update, asModuleFileTransactions.stageUpdate(String, List, Function, Catalogue, Downloader, Function)does, reading the loaded modules only under the lock that an uninstall's cancellation also takes (Codex round 16, #561).ModuleFileTransactions.stageUpdate(String identifyString, List<UltiToolsPlugin> loaded, Function<UltiToolsPlugin, File> codeSource, ModuleFileTransactions.Catalogue catalogue, ModuleFileTransactions.Downloader downloader) Stages an update of a loaded module: downloads its latest version into the transaction folder and records it, leaving the modules folder untouched.ModuleFileTransactions.stageUpdate(String identifyString, List<UltiToolsPlugin> loaded, Function<UltiToolsPlugin, File> codeSource, ModuleFileTransactions.Catalogue catalogue, ModuleFileTransactions.Downloader downloader, Function<UltiToolsPlugin, String> mainClassOf) Stages an update of a loaded module, asModuleFileTransactions.stageUpdate(String, List, Function, Catalogue, Downloader)does, with the module's main class as the module loader recorded it.PluginInstallUtils.stageUpdate(String identifyString) Stages an update of a loaded module to its latest version (#505).private static ModuleFileTransactions.StageResultModuleFileTransactions.verifyStaged(ModuleFileTransactions.Record record, File work, File staged, String latest, String previousFailure) Checks the downloaded JAR -- the size/entry guard, its identity, that it declares the version the catalogue offered, and that itsapi-versionis one this framework installs (ModuleApiLevels; plan 18-40) -- and on success records its version and SHA-256.ModuleFileTransactions.writeStaged(ModuleFileTransactions.Record record, File work, String previousFailure) Writes thePENDINGrecord of a staged JAR, under the lock; the staging is discarded when it cannot be.Methods in com.ultikits.ultitools.utils with parameters of type ModuleFileTransactions.StageResultModifier and TypeMethodDescription(package private) static ModuleFileTransactions.ReservationModuleFileTransactions.Reservation.refused(ModuleFileTransactions.StageResult refusal) Constructors in com.ultikits.ultitools.utils with parameters of type ModuleFileTransactions.StageResultModifierConstructorDescription(package private)Reservation(UltiToolsPlugin module, File oldJar, String oldSha256, String previousFailure, ModuleFileTransactions.StageResult refusal)