Examples of EntryRefreshPolicy


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

Examples of com.opensymphony.oscache.base.EntryRefreshPolicy

    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

Examples of com.opensymphony.oscache.base.EntryRefreshPolicy

        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
Copyright © 2018 www.massapi.com. 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.