Class ServerPropertiesManager.SetAllResult

java.lang.Object
com.ultikits.ultitools.manager.ServerPropertiesManager.SetAllResult
Enclosing class:
ServerPropertiesManager

@Internal public static final class ServerPropertiesManager.SetAllResult extends Object
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 Details

  • 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 — unmodifiableList is 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 own server.properties (D-15) — Gate-2 finding: kept distinct from failed so the response can say "this server version has no such key" rather than making it indistinguishable from a genuine read/write I/O error, matching what a single-key action: "set" already reports via ServerPropertiesManager.describeOutcome(WriteOutcome).
  • Method Details

    • getUpdated

      public List<String> getUpdated()
      Keys written to disk.
    • getRejected

      public List<String> getRejected()
      Keys refused because they are not on the whitelist.
    • getFailed

      public List<String> getFailed()
      Whitelisted keys whose write failed.
    • getSkipped

      public List<String> getSkipped()
      Keys whose value was an explicit JSON null.
    • getMalformed

      public List<String> getMalformed()
      Keys whose value was not a JSON primitive.
    • getNotPresentOnServer

      public List<String> getNotPresentOnServer()
      Keys on ServerPropertiesManager.SAFE_KEYS but absent from THIS server's own server.properties (D-15). Distinct from getFailed() — 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

      public String describeFailure()
      One line naming what went wrong, for a log record or an error response. Returns null when 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.