Package com.ultikits.ultitools.manager
Class ServerPropertiesManager.SetAllResult
java.lang.Object
com.ultikits.ultitools.manager.ServerPropertiesManager.SetAllResult
- Enclosing class:
ServerPropertiesManager
Outcome of one
set_all batch.
isSuccess() means every key the caller asked for is now on disk,
which is the batch analogue of what action: "set" already reports for a
single key. Keys carrying an explicit JSON null are not part of that
promise — a null reads as "leave this one alone", so it is recorded in
getSkipped() for visibility but never fails the batch.
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
ConstructorsConstructorDescriptionSetAllResult(List<String> updated, List<String> rejected, List<String> failed, List<String> skipped, List<String> malformed, List<String> notPresentOnServer) Public so callers outside this package can build one.SetAllResult(List<String> updated, List<String> rejected, List<String> failed, List<String> skipped, List<String> malformed, List<String> notPresentOnServer, Map<String, String> failureReasons) As the six-list constructor, with the reason a failed key was refused (UltiKits/UltiTools-Reborn#607: a key defined on more than one line, or over continuation lines, is not written). -
Method Summary
Modifier and TypeMethodDescriptionprivate Stringdescribe(boolean includeRefusedWithReason) One line naming what went wrong, for a log record or an error response.(package private) StringAsdescribeFailure(), but without the failed keys that carry a refusal reason: the manager has already logged each of those once, with its reason, when it refused the key (17-66 review R66-I1), so the batch summary line names only what nothing else has reported.Whitelisted keys whose write failed.Why a failed key was refused, for the keys that were refused rather than failing on I/O.Keys whose value was not a JSON primitive.Keys onServerPropertiesManager.SAFE_KEYSbut absent from THIS server's ownserver.properties(D-15).Keys refused because they are not on the whitelist.Keys whose value was an explicit JSON null.Keys written to disk.booleanEvery requested key was written.
-
Field Details
-
updated
-
rejected
-
failed
-
skipped
-
malformed
-
notPresentOnServer
-
failureReasons
-
-
Constructor Details
-
SetAllResult
public SetAllResult(List<String> updated, List<String> rejected, List<String> failed, List<String> skipped, List<String> malformed, List<String> notPresentOnServer) Public so callers outside this package can build one. Each list is copied before being wrapped —unmodifiableListis a view, so wrapping the caller's list directly would leave this "immutable" object mutable through the original reference.- Parameters:
notPresentOnServer- keys allowlisted but absent from THIS server's ownserver.properties(D-15) — Gate-2 finding: kept distinct fromfailedso the response can say "this key is not in this server's server.properties" rather than making it indistinguishable from a genuine read/write I/O error, matching what a single-keyaction: "set"already reports viaServerPropertiesManager.describeOutcome(WriteOutcome).
-
SetAllResult
public SetAllResult(List<String> updated, List<String> rejected, List<String> failed, List<String> skipped, List<String> malformed, List<String> notPresentOnServer, Map<String, String> failureReasons) As the six-list constructor, with the reason a failed key was refused (UltiKits/UltiTools-Reborn#607: a key defined on more than one line, or over continuation lines, is not written). Reasons never carry a value.- Parameters:
failureReasons- failed key to the reason it was refused; keys without a reason failed on I/O- Since:
- 6.3.0
-
-
Method Details
-
getUpdated
Keys written to disk. -
getRejected
Keys refused because they are not on the whitelist. -
getFailed
Whitelisted keys whose write failed. -
getFailureReasons
Why a failed key was refused, for the keys that were refused rather than failing on I/O.- Returns:
- failed key to reason (never a value)
- Since:
- 6.3.0
-
getSkipped
Keys whose value was an explicit JSON null. -
getMalformed
Keys whose value was not a JSON primitive. -
getNotPresentOnServer
Keys onServerPropertiesManager.SAFE_KEYSbut absent from THIS server's ownserver.properties(D-15). Distinct fromgetFailed()— writing one of these was never attempted; it is a version mismatch, not an I/O failure. -
isSuccess
public boolean isSuccess()Every requested key was written. -
describeFailure
One line naming what went wrong, for a log record or an error response. Returnsnullwhen nothing went wrong.The categories stay separate because they need different actions: a rejected key means stop asking for it, a failed key means look at the disk, a malformed key means fix the payload, and a not-present-on-server key means this Paper version does not have it. Collapsing them into one label would send the reader looking in the wrong place — which is the failure mode this whole change exists to remove.
-
describeUnreportedFailure
String describeUnreportedFailure()AsdescribeFailure(), but without the failed keys that carry a refusal reason: the manager has already logged each of those once, with its reason, when it refused the key (17-66 review R66-I1), so the batch summary line names only what nothing else has reported. Returnsnullwhen nothing is left. -
describe
-