Examples of CacheStatistics


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

      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

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

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

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

Examples of org.sonatype.nexus.proxy.cache.CacheStatistics

            */

      // mustang is able to get this with File.getUsableFreeSpace();
      resource.setFreeSpaceOnDisk(-1);

      CacheStatistics stats = repository.getNotFoundCache().getStatistics();

      resource.setNotFoundCacheSize(stats.getSize());

      resource.setNotFoundCacheHits(stats.getHits());

      resource.setNotFoundCacheMisses(stats.getMisses());

      resource.setLocalStorageErrorsCount(0);

      resource.setRemoteStorageErrorsCount(0);

View Full Code Here

Examples of org.sonatype.nexus.proxy.cache.CacheStatistics

  protected NFCRepositoryResource createNFCRepositoryResource(Repository repository) {
    NFCRepositoryResource repoNfc = new NFCRepositoryResource();

    repoNfc.setRepositoryId(repository.getId());

    CacheStatistics stats = repository.getNotFoundCache().getStatistics();

    NFCStats restStats = new NFCStats();

    restStats.setSize(stats.getSize());

    restStats.setHits(stats.getHits());

    restStats.setMisses(stats.getMisses());

    repoNfc.setNfcStats(restStats);

    repoNfc.getNfcPaths().addAll(repository.getNotFoundCache().listKeysInCache());
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.