Package javax.util.jcache

Examples of javax.util.jcache.CacheLoader.load()


        if (objHandle.needsLoading(arguments)) {
            Attributes attribs = objHandle.getAttributes();
            CacheLoader loader = attribs.getLoader();
            Object retrievedObject;
            try {
                retrievedObject = loader.load(objHandle, arguments);
                if (retrievedObject == null) {
                    throw new ObjectNotFoundException("The returned object from the CacheLoader " + loader.getClass().getName() + " was null.");
                }
                if (retrievedObject instanceof CacheOutputStream) {
                    /*
 
View Full Code Here


                throw new ObjectNotFoundException("The object has no CacheLoader associated with it.");
            }
            Runnable runnable = new Runnable() {
                public void run() {
                    try {
                        loader.load(obj, arguments);
                    } catch (CacheException e) {
                        if (logger != null) {
                            logger.log("The object was not found in the cache.", e);
                        }
                    }
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.