Package org.jboss.cache.loader

Examples of org.jboss.cache.loader.CacheLoader


               }

               if (clearCacheLoader)
               {
                  CacheLoaderManager clm = spi.getCacheLoaderManager();
                  CacheLoader cl = clm == null ? null : clm.getCacheLoader();
                  if (cl != null)
                  {
                     try
                     {
                        cl.remove(Fqn.ROOT);
                     }
                     catch (Throwable t)
                     {
                        // don't care
                     }
View Full Code Here


      if (clm == null)
      {
         LOG.error("The CacheLoaderManager cannot be found");
         return;
      }
      CacheLoader currentCL = clm.getCacheLoader();
      if (currentCL == null)
      {
         LOG.error("The CacheLoader cannot be found");
         return;
      }
View Full Code Here

      if (clm == null)
      {
         LOG.error("The CacheLoaderManager cannot be found");
         return;
      }
      CacheLoader currentCL = clm.getCacheLoader();
      if (currentCL == null)
      {
         LOG.error("The CacheLoader cannot be found");
         return;
      }
View Full Code Here

   public void generateState(ObjectOutputStream out, Object rootNode, boolean generateTransient,
                             boolean generatePersistent, boolean suppressErrors) throws Exception
   {
      Fqn fqn = getFqn(rootNode);
      boolean activated = false;
      CacheLoader cacheLoader = cache.getCacheLoaderManager() == null ? null : cache.getCacheLoaderManager().getCacheLoader();
      boolean needToGeneratePersistentState = generatePersistent && cacheLoader != null;
      try
      {
         cache.getMarshaller().objectToObjectStream(STATE_TRANSFER_VERSION, out);
View Full Code Here

      if (clm == null)
      {
         LOG.error("The CacheLoaderManager cannot be found");
         return;
      }
      CacheLoader currentCL = clm.getCacheLoader();
      if (currentCL == null)
      {
         LOG.error("The CacheLoader cannot be found");
         return;
      }
View Full Code Here

      if (clm == null)
      {
         LOG.error("The CacheLoaderManager cannot be found");
         return null;
      }
      CacheLoader currentCL = clm.getCacheLoader();
      if (currentCL == null)
      {
         LOG.error("The CacheLoader cannot be found");
         return null;
      }
View Full Code Here

            //we have to write two markers for transient and associated
            delimitStream(out);
            delimitStream(out);
         }

         CacheLoader cacheLoader = cache.getCacheLoaderManager() == null ? null : cache.getCacheLoaderManager().getCacheLoader();
         if (cacheLoader != null && generatePersistent)
         {
            if (log.isTraceEnabled())
            {
               log.trace("writing persistent state for " + fqn + ",using " + cache.getCacheLoaderManager().getCacheLoader().getClass());
            }

            if (fqn.isRoot())
            {
               cacheLoader.loadEntireState(out);
            }
            else
            {
               cacheLoader.loadState(fqn, out);
            }

            if (log.isTraceEnabled())
            {
               log.trace("persistent state succesfully written");
View Full Code Here

   }

   protected void integratePersistentState(ObjectInputStream in, Fqn targetFqn) throws Exception
   {
      CacheLoaderManager loaderManager = cache.getCacheLoaderManager();
      CacheLoader loader = loaderManager == null ? null : loaderManager.getCacheLoader();
      if (loader == null)
      {
         if (trace)
         {
            log.trace("cache loader is null, will not attempt to integrate persistent state");
         }
      }
      else
      {

         if (trace)
         {
            log.trace("integrating persistent state using " + loader.getClass().getName());
         }

         boolean persistentSet = false;
         try
         {
            if (targetFqn.isRoot())
            {
               loader.storeEntireState(in);
            }
            else
            {
               loader.storeState(targetFqn, in);
            }
            persistentSet = true;
         }
         catch (ClassCastException cce)
         {
            log.error("Failed integrating persistent state. One of cacheloaders is not"
                  + " adhering to state stream format. See JBCACHE-738.");
            throw cce;
         }
         finally
         {
            if (!persistentSet)
            {
               log.warn("persistent state integration failed, removing all nodes from loader");
               loader.remove(targetFqn);
            }
            else
            {
               if (trace)
               {
View Full Code Here

      if (clm == null)
      {
         LOG.error("The CacheLoaderManager cannot be found");
         return;
      }
      CacheLoader currentCL = clm.getCacheLoader();
      if (currentCL == null)
      {
         LOG.error("The CacheLoader cannot be found");
         return;
      }
View Full Code Here

      if (clm == null)
      {
         LOG.error("The CacheLoaderManager cannot be found");
         return;
      }
      CacheLoader currentCL = clm.getCacheLoader();
      if (currentCL == null)
      {
         LOG.error("The CacheLoader cannot be found");
         return;
      }
View Full Code Here

TOP

Related Classes of org.jboss.cache.loader.CacheLoader

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.