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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Data get​(java.lang.String userId, java.lang.String path, java.util.Locale locale, java.util.Calendar modificationDate)
      Gets a report by its path.
      void put​(java.lang.String userId, java.lang.String path, java.util.Locale locale, Data data, java.util.Calendar modificationDate)
      Adds the specified report data to the cache.
    • Method Detail

      • put

        void put​(java.lang.String userId,
                 java.lang.String path,
                 java.util.Locale locale,
                 Data data,
                 java.util.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​(java.lang.String userId,
                 java.lang.String path,
                 java.util.Locale locale,
                 java.util.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