Interface DataCache


public interface DataCache

Provides caching for Data over several requests.

The cache doesn't need to provide synchronization; synchronization must be provided from the clients of the cache.

The exact caching algorithm is left to the implementation. Memory consumption should be a considered important, as reports may grow quite large.

  • Method Summary

    Modifier and Type
    Method
    Description
    get(String userId, String path, Locale locale, Calendar modificationDate)
    Gets a report by its path.
    void
    put(String userId, String path, Locale locale, Data data, Calendar modificationDate)
    Adds the specified report data to the cache.
  • Method Details

    • put

      void put(String userId, String path, Locale locale, Data data, Calendar modificationDate)
      Adds the specified report data to the cache.
      Parameters:
      userId - The ID of the user to cache the report for
      path - The path of the report
      locale - The locale the report was created for
      data - The report data to add
      modificationDate - The date of the report's last modification
    • get

      Data get(String userId, String path, Locale locale, Calendar modificationDate)
      Gets a report by its path.
      Parameters:
      userId - The ID of the user to determine the report for
      path - The path
      locale - The locale the data has to be determined for
      modificationDate - The date of the report's last modification
      Returns:
      The cached report; null if the report is not cached