Package org.jboss.cache

Examples of org.jboss.cache.InvocationContext


      return Version.printVersion();
   }

   public void move(Fqn nodeToMove, Fqn newParent) throws NodeNotExistsException
   {
      InvocationContext ctx = invocationContextContainer.get();
      cacheStatusCheck(ctx);
      MoveCommand command = commandsFactory.buildMoveCommand(nodeToMove, newParent);
      invoker.invoke(ctx, command);
   }
View Full Code Here


      return regionManager.getRegion(fqn, createIfAbsent);
   }

   public void evict(Fqn fqn, boolean recursive)
   {
      InvocationContext ctx = invocationContextContainer.get();
      cacheStatusCheck(ctx);
      EvictCommand c = commandsFactory.buildEvictFqnCommand(fqn);
      c.setRecursive(recursive);
      invoker.invoke(ctx, c);
   }
View Full Code Here

   }

   @SuppressWarnings("unchecked")
   public V get(Fqn fqn, K key)
   {
      InvocationContext ctx = invocationContextContainer.get();
      cacheStatusCheck(ctx);
      GetKeyValueCommand command = commandsFactory.buildGetKeyValueCommand(fqn, key, true);
      return (V) invoker.invoke(ctx, command);
   }
View Full Code Here

      // special case if we are removing the root.  Remove all children instead.
      if (fqn.isRoot())
      {
         boolean result = true;
         // we need to preserve options
         InvocationContext ctx = getInvocationContext();
         Option o = ctx.getOptionOverrides();
         Set<Fqn> internalFqns = getInternalFqns();
         for (Object childName : peek(fqn, false, false).getChildrenNames())
         {
            if (!internalFqns.contains(Fqn.fromElements(childName)))
            {
               ctx.setOptionOverrides(o);
               result = removeNode(Fqn.fromRelativeElements(fqn, childName)) && result;
            }
         }
         return result;
      }
      else
      {
         InvocationContext ctx = invocationContextContainer.get();
         cacheStatusCheck(ctx);
         GlobalTransaction tx = transactionTable.getCurrentTransaction();
         RemoveNodeCommand command = commandsFactory.buildRemoveNodeCommand(tx, fqn);
         Object retval = invoker.invoke(ctx, command);
         return retval != null && (Boolean) retval;
View Full Code Here

   }

   @SuppressWarnings("unchecked")
   public NodeSPI<K, V> getNode(Fqn fqn)
   {
      InvocationContext ctx = invocationContextContainer.get();
      cacheStatusCheck(ctx);
      GetNodeCommand command = commandsFactory.buildGetNodeCommand(fqn);
      return (NodeSPI<K, V>) invoker.invoke(ctx, command);
   }
View Full Code Here

   }

   @SuppressWarnings("unchecked")
   public V remove(Fqn fqn, K key) throws CacheException
   {
      InvocationContext ctx = invocationContextContainer.get();
      cacheStatusCheck(ctx);
      GlobalTransaction tx = transactionTable.getCurrentTransaction();
      RemoveKeyCommand command = commandsFactory.buildRemoveKeyCommand(tx, fqn, key);
      return (V) invoker.invoke(ctx, command);
   }
View Full Code Here

      return remove(Fqn.fromString(fqn), key);
   }

   public void put(Fqn fqn, Map<? extends K, ? extends V> data)
   {
      InvocationContext ctx = invocationContextContainer.get();
      cacheStatusCheck(ctx);
      PutDataMapCommand command = commandsFactory.buildPutDataMapCommand(null, fqn, data);
      invoker.invoke(ctx, command);
   }
View Full Code Here

      put(Fqn.fromString(fqn), data);
   }

   public void putForExternalRead(Fqn fqn, K key, V value)
   {
      InvocationContext ctx = invocationContextContainer.get();
      cacheStatusCheck(ctx);
      // if the node exists then this should be a no-op.
      if (peek(fqn, false, false) == null)
      {
         getInvocationContext().getOptionOverrides().setFailSilently(true);
View Full Code Here

   }

   @SuppressWarnings("unchecked")
   public V put(Fqn fqn, K key, V value)
   {
      InvocationContext ctx = invocationContextContainer.get();
      cacheStatusCheck(ctx);
      GlobalTransaction tx = transactionTable.getCurrentTransaction();
      PutKeyValueCommand command = commandsFactory.buildPutKeyValueCommand(tx, fqn, key, value);
      return (V) invoker.invoke(ctx, command);
   }
View Full Code Here


   @SuppressWarnings("unchecked")
   public Map<K, V> getData(Fqn fqn)
   {
      InvocationContext ctx = invocationContextContainer.get();
      cacheStatusCheck(ctx);
      GetDataMapCommand command = commandsFactory.buildGetDataMapCommand(fqn);
      return (Map<K, V>) invoker.invoke(ctx, command);
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.InvocationContext

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.