Class PendingChanges

java.lang.Object
com.ultikits.ultitools.utils.PendingChanges

@Internal public final class PendingChanges extends Object
A bounded view of the transaction journal and its single-entry revocation operation.
  • Field Details

  • Constructor Details

  • Method Details

    • list

      Returns:
      the first MAX_ITEMS entries, oldest first, then by id
    • snapshot

      public PendingChanges.Snapshot snapshot()
      Returns:
      the entries, their truncation count and the generation from one locked read
    • findByModule

      public PendingChanges.PendingChange findByModule(String name)
      Returns:
      the entry matching the identify string, module name or JAR name, or null
    • revokeByModule

      public PendingChanges.RevokeResult revokeByModule(String name)
      Returns:
      the result of finding and revoking a module in one locked operation
    • revoke

      public PendingChanges.RevokeResult revoke(String id, String expectedRevision, boolean checkRevision)
      Revokes one transaction by id; the revision check prevents acting on a stale view. A null expected revision matches only a download when checking is enabled.
      Parameters:
      id - the transaction id, as returned by list()
      expectedRevision - the revision observed by the caller, or null for a download
      checkRevision - whether to compare the caller's revision before mutating anything
      Returns:
      the result of the attempt