Class SCMProbe

All Implemented Interfaces:
Closeable, Serializable, AutoCloseable

public abstract class SCMProbe extends SCMSourceCriteria.Probe implements Closeable
An unmanaged SCMSourceCriteria.Probe that has its lifecycle managed outside of SCMSource.fetch(TaskListener). A SCMProbe is used to check and recheck SCMSourceCriteria so implementations are strongly recommended to provide caching of results from stat(String) and SCMSourceCriteria.Probe.lastModified().
Since:
2.0
See Also:
  • Constructor Details

    • SCMProbe

      public SCMProbe()
  • Method Details

    • exists

      @Deprecated public final boolean exists(@NonNull String path) throws IOException
      Deprecated.
      Checks if the path, relative to the head candidate root, exists or not. The results of this method should be cached where possible but can involve a remote network call.
      Specified by:
      exists in class SCMSourceCriteria.Probe
      Parameters:
      path - the path.
      Returns:
      true iff the path exists (may be a file or a directory or a symlink or whatever).
      Throws:
      IOException - if a remote network call failed and the result is therefore indeterminate.
    • stat

      @NonNull public abstract SCMProbeStat stat(@NonNull String path) throws IOException
      Checks if the path, relative to the head candidate root, exists or not. The results of this method should be cached where possible but can involve a remote network call.
      Overrides:
      stat in class SCMSourceCriteria.Probe
      Parameters:
      path - the path.
      Returns:
      The results of the check.
      Throws:
      IOException - if a remote network call failed and the result is therefore indeterminate.