Package org.jboss.virtual.spi.cache

Examples of org.jboss.virtual.spi.cache.CacheStatistics


      for (VFSContext context : permanentCache.getCachedContexts())
         contexts.add(context);

      if (realCache instanceof CacheStatistics)
      {
         CacheStatistics cs = CacheStatistics.class.cast(realCache);
         for (VFSContext context : cs.getCachedContexts())
            contexts.add(context);
      }

      return contexts;
   }
View Full Code Here


      cache.start();
      try
      {
         if (cache instanceof CacheStatistics)
         {
            CacheStatistics statistics = CacheStatistics.class.cast(cache);
            VFSCacheFactory.setInstance(cache);
            try
            {
               configureCache(cache);

               VirtualFile root = VFS.getRoot(url);
               assertNotNull(root);

               Iterable<VFSContext> iter = statistics.getCachedContexts();
               testCachedContexts(iter);

               assertEquals(1, statistics.size());
               assertTrue(statistics.lastInsert() != 0);
            }
            finally
            {
               VFSCacheFactory.setInstance(null);
            }
View Full Code Here

         {
            statistics = CacheStatistics.class.cast(cache);
         }
         else
         {
            statistics = new CacheStatistics()
            {
               public Iterable<VFSContext> getCachedContexts()
               {
                  return Collections.emptySet();
               }
View Full Code Here

      for (VFSContext context : permanentCache.getCachedContexts())
         contexts.add(context);

      if (realCache instanceof CacheStatistics)
      {
         CacheStatistics cs = CacheStatistics.class.cast(realCache);
         for (VFSContext context : cs.getCachedContexts())
            contexts.add(context);
      }

      return contexts;
   }
View Full Code Here

TOP

Related Classes of org.jboss.virtual.spi.cache.CacheStatistics

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.