Interface ConditionalLoadXMLObjectLoadSaveManager<T extends XMLObject>

Type Parameters:
T - the base type of XML objects being managed
All Superinterfaces:
All Known Implementing Classes:
AbstractConditionalLoadXMLObjectLoadSaveManager, FilesystemLoadSaveManager, MapLoadSaveManager

public interface ConditionalLoadXMLObjectLoadSaveManager<T extends XMLObject> extends XMLObjectLoadSaveManager<T>
Interface for specialization of XMLObjectLoadSaveManager implementations which track the modify times of requested data such that XMLObjectLoadSaveManager.load(String) returns data only if the data associated with the key has been modified since the last request.
  • Method Details

    • isLoadConditionally

      boolean isLoadConditionally()
      Get whether XMLObjectLoadSaveManager.load(String) will check and return data only if modified since the last request for that data.
      true if data modify time check is enabled, false if not
    • getLoadLastModified

      @Nullable Instant getLoadLastModified(@Nonnull String key)
      Retrieve the cached modified time for the last load of the specified key.

      Note that this will be null if XMLObjectLoadSaveManager.load(String) has not been called for the specified key since construction or since the last call to clearLoadLastModified(String) or clearAllLoadLastModified().

      key - the target key
      the current cached modified time, may be null
    • clearLoadLastModified

      @Nullable Instant clearLoadLastModified(@Nonnull String key)
      Clear the cached modified time for the last load of the specified key.
      key - the target key
      the previously cached modified time, or null if did not exist
    • clearAllLoadLastModified

      void clearAllLoadLastModified()
      Clear the cached modified times for the last load for all keys.