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

com.adobe.aemds.guide.cache.api.CacheStore Maven / Gradle / Ivy

/*******************************************************************************
 * ADOBE CONFIDENTIAL
 * ___________________
 * Copyright 2016 Adobe Systems Incorporated
 * All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Adobe Systems Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Adobe Systems Incorporated and its
 * suppliers and are protected by all applicable intellectual property
 * laws, including trade secret and copyright laws.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.
 ******************************************************************************/

package com.adobe.aemds.guide.cache.api;

import com.adobe.aemds.guide.cache.CacheObject;
import com.adobe.aemds.guide.service.GuideException;

import java.util.Calendar;

public interface CacheStore {
    /**
     * Put an object in the cache with a key that can be used to retrieve the object later. If the object already exists
     * it will be replaced
     *
     * @param key   Key against which the value is stored in cache
     * @param value value to store in the cache
     * @return Object previously associated with the key in the cache
     */
    public CacheObject put(Object key, CacheObject value);

    /**
     * Get an object from the cache. If not present null is returned
     *
     * @param key
     * @return
     */
    public CacheObject get(Object key);

    /**
     * Clears all the entries in the cache
     */
    public void clearAll();

    /**
     * Removes the value from the cache associated with the key
     *
     * @param key key associated with the object that has to be removed
     */
    public void clear(String key);

    /**
     * Returns if a value is associated with the key
     *
     * @param key
     * @return true if a value is associated with the key false otherwise
     */
    public boolean entryExists(Object key);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy