Package com.opensymphony.oscache.base

Examples of com.opensymphony.oscache.base.EntryRefreshPolicy


            return null;
        }
    }

    public void put(Object key, Object value, Date expired) {
        EntryRefreshPolicy refreshPolicy = null;

        if (expired != null) {
            int ttl = (int) (expired.getTime() - System.currentTimeMillis()) / 1000;

            refreshPolicy = new ExpiresRefreshPolicy(ttl);
View Full Code Here


    setUpCacheAdministrator();

    Cache cache = cacheAdministrator.getCache();

    cache.putInCache(CACHE_KEY, "An Object",
        new EntryRefreshPolicy() {
          /** force refresh */
          public boolean needsRefresh(CacheEntry cacheEntry) {
            return true;
          }
        });
View Full Code Here

        if (cacheGroupsProviderParam != null) {
            setCacheGroupsProvider(cacheGroupsProviderParam);
        }
       
        // filter parameter EntryRefreshPolicy
        EntryRefreshPolicy expiresRefreshPolicyParam = (EntryRefreshPolicy)instantiateFromInitParam("EntryRefreshPolicy", EntryRefreshPolicy.class, ExpiresRefreshPolicy.class.getName());
        if (expiresRefreshPolicyParam != null) {
            setExpiresRefreshPolicy(expiresRefreshPolicyParam);
        } else {
            // setting the refresh period for this cache filter
            setExpiresRefreshPolicy(new ExpiresRefreshPolicy(time));
View Full Code Here

TOP

Related Classes of com.opensymphony.oscache.base.EntryRefreshPolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.