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

com.adobe.aemds.guide.cache.CacheObject 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;

import java.util.Calendar;

/**
 * Wrapper class for Caching Objects in the GuideCache. The Instance stores the actual object
 */
public class CacheObject {
    private Object cacheObject;
    private Calendar lastModifiedTime;

    /**
     * Constructs a new CacheObject that wraps the original value and the Last Modified Time
     *
     * @param value object to be cached
     * @param LMT   Last Modified Time for the Cached Object
     */
    public CacheObject(Object value, Calendar LMT) {
        cacheObject = value;
        lastModifiedTime = LMT;
    }

    /**
     * Constructs a new CacheObject that wraps the original value and LMT to be the time when this wrapper is
     * constructed
     *
     * @param value object to be cached
     */
    public CacheObject(Object value) {
        this(value, Calendar.getInstance());
    }

    /**
     * Returns the Object Cached
     *
     * @return Returns the Object Cached
     */
    public Object getCacheObject() {
        return cacheObject;
    }

    /**
     * Returns the LMT of the Cached Object
     *
     * @return Returns the LMT of the Cached Object
     */
    public Calendar getLastModifiedTime() {
        return lastModifiedTime;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy