Class RemoteCatalog

java.lang.Object
org.jenkins.plugins.lockableresources.remote.RemoteCatalog

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public final class RemoteCatalog extends Object
What a remote server publishes, as this controller last saw it.

A snapshot, not a live view: the remote is the source of truth for its own resources and this is a copy that was accurate when it was fetched. getFetchedAt() says when that was, and getError() says why a refresh did not happen, so the page can show an honest age rather than implying the numbers are current.

  • Method Details

    • getServerId

      public String getServerId()
    • getResources

      @NonNull public List<RemoteCatalog.Resource> getResources()
    • isAcceptNewAcquires

      public boolean isAcceptNewAcquires()
      Whether the remote is currently handing out new locks at all.
    • getFetchedAt

      public long getFetchedAt()
      When this snapshot was taken, or 0 if nothing has ever been fetched.
    • getError

      @CheckForNull public String getError()
      Why the last refresh failed, or null if it succeeded.
    • isStale

      public boolean isStale(long ttlMillis)