All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.day.cq.reporting.DataCache Maven / Gradle / Ivy

There is a newer version: 2024.11.18751.20241128T090041Z-241100
Show newest version
/*
 * Copyright 1997-2010 Day Management AG
 * Barfuesserplatz 6, 4001 Basel, Switzerland
 * All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * Day Management AG, ("Confidential Information"). You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Day.
 */

package com.day.cq.reporting;

import java.util.Calendar;
import java.util.Locale;

/**
 * 

Provides caching for {@link 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.

*/ public interface DataCache { /** * Adds the specified report data to the cache. * * @param userId The ID of the user to cache the report for * @param path The path of the report * @param locale The locale the report was created for * @param data The report data to add * @param modificationDate The date of the report's last modification */ void put(String userId, String path, Locale locale, Data data, Calendar modificationDate); /** * Gets a report by its path. * * @param userId The ID of the user to determine the report for * @param path The path * @param locale The locale the data has to be determined for * @param modificationDate The date of the report's last modification * @return The cached report; null if the report is not cached */ Data get(String userId, String path, Locale locale, Calendar modificationDate); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy