Package gov.nasa.worldwind.cache

Examples of gov.nasa.worldwind.cache.MemoryCache


         throw new Exception("wwd == null");

      if (!wwd.getMemoryCacheSet().containsCache(BUFFERED_IMAGE_CACHE_NAME))
      {
         long size = Configuration.getLongValue(BUFFERED_IMAGE_CACHE_SIZE, DEFAULT_BUFFERED_IMAGE_CACHE_SIZE);
         MemoryCache cache = new BasicMemoryCache((long) (0.85 * size), size);
         wwd.getMemoryCacheSet().addCache(BUFFERED_IMAGE_CACHE_NAME, cache);
      }


      this.initializeSlideShow();
View Full Code Here


      WorldWind wwd = WorldWind.getInstance();

      if (wwd == null)
         throw new Exception("wwd == null");

      MemoryCache cache = wwd.getMemoryCache(BUFFERED_IMAGE_CACHE_NAME);

      boolean addToCache = (sizeInBytes < cache.getCapacity());

      // If the image is too large for the cache, then do not add it to the cache.
      if (addToCache)
      {
         cache.add(source, image, sizeInBytes);
      }

      return addToCache;
   }
View Full Code Here

TOP

Related Classes of gov.nasa.worldwind.cache.MemoryCache

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.