Examples of CacheEntryFilter


Examples of com.volantis.cache.filter.CacheEntryFilter

                        // Determine whether to flush even or odd keys.
                        final int evenOrOdd = random.nextInt(2);

                        // Select those keys with even indeces.
                        group.flush(new CacheEntryFilter() {
                            public boolean select(CacheEntry entry) {
                                Key key = (Key) entry.getKey();
                                return (key.getIndex() % 2 == evenOrOdd);
                            }
                        });
View Full Code Here

Examples of com.volantis.cache.filter.CacheEntryFilter

    // Javadoc inherited.
    public void flushProject(
            RuntimeProject project,
            PolicyType policyType) {

        CacheEntryFilter filter = getFilter(policyType);

        Group group = project.getCacheGroup();
        group.flush(filter);
    }
View Full Code Here

Examples of com.volantis.cache.filter.CacheEntryFilter

        delegate.removeEntry(name);
    }

    // Javadoc inherited.
    public CacheEntryFilter getFilter(PolicyType policyType) {
        CacheEntryFilter filter = null;
        if (policyType != null) {
            filter = new PolicyTypeCacheEntryFilter(policyType);
        }
        return filter;
    }
View Full Code Here

Examples of com.volantis.cache.filter.CacheEntryFilter

     * @param policyType The type of policies to flush, may be null in which
     *                   case all policies of any type are flushed.
     */
    private void flushLocalPolicyCaches(PolicyType policyType) {
        Group group = policyCache.getLocalGroup();
        CacheEntryFilter filter = policyCache.getFilter(policyType);
        group.flush(filter);
    }
View Full Code Here

Examples of org.objectweb.perseus.cache.api.CacheEntryFilter

        }
    }
    public void evictAll(Class clazz, boolean subClasses) {
        final List classesToEvict = getClasses(clazz, subClasses);
        try {
            unbindManager.unbind(new CacheEntryFilter() {
                public boolean accept(CacheEntry ce) {
                    Object o = ce.getCeObject();
                    return o != null && classesToEvict.contains(o.getClass());
                }
            }, false);
View Full Code Here

Examples of org.objectweb.perseus.cache.api.CacheEntryFilter

        } //else TODO: pin forever an oid by creating the CacheEntry
    }
    public void pinAll(Class clazz, boolean subClasses) {
        final List classesToPin = getClasses(clazz, subClasses);
        try {
            cacheManager.unfix(new CacheEntryFilter() {
                public boolean accept(CacheEntry ce) {
                    Object o = ce.getCeObject();
                    return ((FixableCacheEntry) ce).getCeFixCount() == 0
                      && o != null && classesToPin.contains(o.getClass());
                }
View Full Code Here

Examples of org.objectweb.perseus.cache.api.CacheEntryFilter

        }
    }
    public void unpinAll(Class clazz, boolean subClasses) {
        final List classesToUnpin = getClasses(clazz, subClasses);
        try {
            cacheManager.unfix(new CacheEntryFilter() {
                public boolean accept(CacheEntry ce) {
                    Object o = ce.getCeObject();
                    return ((FixableCacheEntry) ce).getCeFixCount() == 1
                      && o != null && classesToUnpin.contains(o.getClass());
                }
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.