Package org.jboss.cache

Examples of org.jboss.cache.Region


      return retValue;
   }

   private Region findRegion(Fqn fqn) throws InactiveRegionException
   {
      Region region = regionManager.getValidMarshallingRegion(fqn);

      if (region != null)
      {
         Status status = region.getStatus();
         if (status == Status.INACTIVATING || status == Status.INACTIVE)
         {
            if (log.isDebugEnabled())
            {
               throw new InactiveRegionException("Cannot unmarshall message for region " + fqn + ". This region is inactive.");
View Full Code Here


   private Fqn extractFqnRegion(ReplicableCommand cmd) throws Exception
   {
      Fqn fqn = extractFqn(cmd);

      Region r = regionManager.getValidMarshallingRegion(fqn);
      return r == null ? null : r.getFqn();
   }
View Full Code Here

   }

   @Override
   protected Region getRegion(Fqn fqn)
   {
      Region r = super.getRegion(fqn);
      if (r != null)
         return r;
      else if (buddyFqnTransformer.isBackupFqn(fqn))
      {
         // try and grab a backup region, creating one if need be.
         Fqn actualFqn = buddyFqnTransformer.getActualFqn(fqn);
         Fqn backupRoot = buddyFqnTransformer.getBackupRootFromFqn(fqn);

         // the actual region could be a few levels higher than actualFqn
         Region actualRegion = regionManager.getRegion(actualFqn, Region.Type.EVICTION, false);

         if (actualRegion == null) return null;

         //create a new region for this backup
         Region newRegion = regionManager.getRegion(Fqn.fromRelativeFqn(backupRoot, actualRegion.getFqn()), Region.Type.EVICTION, true);
         newRegion.setEvictionRegionConfig(actualRegion.getEvictionRegionConfig());

         return newRegion;
      }
      else return null;
   }
View Full Code Here

      // because it still has children.
      // If yes, put an ADD event in the queue so the node gets revisited
      boolean complete = (retVal != null && (Boolean) retVal);
      if (!complete)
      {
         Region r;
         if (fqn != null && (r = getRegion(fqn)) != null)
         {
            registerEvictionEventToRegionManager(fqn, ADD_NODE_EVENT, 0, r);
         }
      }
View Full Code Here

   @Override
   public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
   {
      Object retVal = invokeNextInterceptor(ctx, command);
      Region r;
      if (command.getFqn() != null && command.getKey() != null && (r = getRegion(command.getFqn())) != null)
      {
         registerEvictionEventToRegionManager(command.getFqn(), ADD_ELEMENT_EVENT, 1, r);
      }
      return retVal;
View Full Code Here

   @Override
   public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
   {
      Object retVal = invokeNextInterceptor(ctx, command);
      Fqn fqn = command.getFqn();
      Region r;
      if (fqn != null && (r = getRegion(fqn)) != null)
      {
         if (command.getData() == null)
         {
            if (trace)
View Full Code Here

      }
      else
      {
         Fqn fqn = command.getFqn();
         Region r;
         if (fqn != null && command.getKey() != null && (r = getRegion(fqn)) != null)
         {
            registerEvictionEventToRegionManager(fqn, REMOVE_ELEMENT_EVENT, 1, r);
         }
      }
View Full Code Here

            log.trace("No event added. Node does not exist");
         }
      }
      else
      {
         Region r;
         if (fqn != null && (r = getRegion(fqn)) != null)
         {
            registerEvictionEventToRegionManager(fqn, VISIT_NODE_EVENT, 0, r);
         }
      }
View Full Code Here

   @Override
   public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
   {
      Object retVal = invokeNextInterceptor(ctx, command);
      Fqn fqn = command.getFqn();
      Region r;
      if (retVal == null)
      {
         if (trace)
         {
            log.trace("No event added. Element does not exist");
View Full Code Here

   @Override
   public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
   {
      Object retVal = invokeNextInterceptor(ctx, command);
      Region r;
      if (command.getFqn() != null && (r = getRegion(command.getFqn())) != null)
      {
         registerEvictionEventToRegionManager(command.getFqn(), REMOVE_NODE_EVENT, 0, r);
      }
      return retVal;
View Full Code Here

TOP

Related Classes of org.jboss.cache.Region

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.