java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.indexer.FileStateCache

public class FileStateCache extends Object
Holds a cache that maps filenames (absolute paths on the local filesystem) to "up to date" states. A file is "up to date" if its content is known to be in sync with the index. A file is not up to date if there is any possibility that its content might be out of sync with the index.
  • Constructor Details

    • FileStateCache

      public FileStateCache()
  • Method Details

    • isUpToDate

      public Boolean isUpToDate(String location)
      Returns true if the file at the given path is in sync with the index. Returns false if the file has already been tested and might be out-of-sync. Returns null if its status is unknown and needs to be tested.
      Parameters:
      location - an absolute path on the filesystem
    • getCache

      public static FileStateCache getCache(Nd nd)
      Returns the cache for the given Nd instance.
      Returns:
      the cache for the given Nd. Creates one if it doesn't exist yet.
    • put

      public void put(String location, boolean result)
      Inserts a new entry into the cache.
      Parameters:
      location - absolute filesystem path to the file
      result - true if the file is definitely in sync with the index, false if there is any possibility of it being out of sync.
    • clear

      public void clear()
      Clears the entire cache.
    • remove

      public void remove(String location)
      Removes a single entry from the cache.
      Parameters:
      location - absolute filesystem path to the file.