Package org.jboss.cache.marshall

Examples of org.jboss.cache.marshall.MethodCall


      GlobalTransaction gtx = c.getCurrentTransaction(tx, true);
      TransactionTable table = c.getTransactionTable();
      OptimisticTransactionEntry entry = (OptimisticTransactionEntry) table.get(gtx);
      assertNotNull(mgr.getTransaction());
      MethodCall meth = entry.getModifications().get(0);
      mgr.commit();

      GlobalTransaction remoteGtx = new GlobalTransaction();

      remoteGtx.setAddress(new DummyAddress());
      //hack the method call to make it have the remote gtx

      meth.getArgs()[0] = remoteGtx;
      //call our remote method
      MethodCall prepareMethod = MethodCallFactory.create(MethodDeclarations.optimisticPrepareMethod_id, remoteGtx, injectDataVersion(entry.getModifications()), null,
            remoteGtx.getAddress(), Boolean.FALSE);
      TestingUtil.getRemoteDelegate(c)._replicate(prepareMethod);

      //our thread should be null
      assertNull(mgr.getTransaction());
View Full Code Here


         boolean needToReverseRemove = reverseRemoveCheck && childNode.isDeleted() && tx_table.isNodeRemovedInTx(gtx, fqn);
         if (!needToReverseRemove) return;
         childNode.markAsDeleted(false);
         //if we'll rollback the tx data should be added to the node again
         Map oldData = new HashMap(childNode.getDataDirect());
         MethodCall undoOp = MethodCallFactory.create(MethodDeclarations.putDataMethodLocal_id,
               gtx, fqn, oldData , false);
         tx_table.get(gtx).addUndoOperation(undoOp);
         //we're prepared for rollback, now reset the node
         childNode.clearDataDirect();
         if (createdNodes != null)
View Full Code Here

   }

   public V remove(Fqn<?> fqn, K key) throws CacheException
   {
      GlobalTransaction tx = cache.getCurrentTransaction();
      MethodCall m = MethodCallFactory.create(MethodDeclarations.removeKeyMethodLocal_id, tx, fqn, key, true);
      return (V) invoke(m);
   }
View Full Code Here

   }

   public void put(Fqn<?> fqn, Map<K, V> data)
   {
      GlobalTransaction tx = cache.getCurrentTransaction();
      MethodCall m = MethodCallFactory.create(MethodDeclarations.putDataMethodLocal_id, tx, fqn, data, true);
      invoke(m);
   }
View Full Code Here

      if (peek(fqn, false, false) == null)
      {
         getInvocationContext().getOptionOverrides().setFailSilently(true);
         getInvocationContext().getOptionOverrides().setForceAsynchronous(true);
         //GlobalTransaction tx = cache.getCurrentTransaction();
         MethodCall m = MethodCallFactory.create(MethodDeclarations.putForExternalReadMethodLocal_id, null, fqn, key, value);
         invoke(m);
      }
      else
      {
         if (log.isDebugEnabled())
View Full Code Here

   }

   public V put(Fqn<?> fqn, K key, V value)
   {
      GlobalTransaction tx = cache.getCurrentTransaction();
      MethodCall m = MethodCallFactory.create(MethodDeclarations.putKeyValMethodLocal_id, tx, fqn, key, value, true);
      return (V) invoke(m);
   }
View Full Code Here

    * @return map of data, or an empty map
    * @throws CacheException
    */
   public Map<K, V> getData(Fqn<?> fqn)
   {
      MethodCall m = MethodCallFactory.create(MethodDeclarations.getDataMapMethodLocal_id, fqn);
      return (Map<K, V>) invoke(m);
   }
View Full Code Here

    *
    * @param fqn name of the node
    */
   public Set<K> getKeys(Fqn<?> fqn)
   {
      MethodCall m = MethodCallFactory.create(MethodDeclarations.getKeysMethodLocal_id, fqn);
      return (Set<K>) invoke(m);
   }
View Full Code Here

    * Removes the keys and properties from a named node.
    */
   public void clearData(Fqn fqn)
   {
      GlobalTransaction tx = getCurrentTransaction();
      MethodCall m = MethodCallFactory.create(MethodDeclarations.removeDataMethodLocal_id, tx, fqn, true);
      invoke(m);
   }
View Full Code Here

    * @param fqn The fully qualified name of the node
    * @return Set an unmodifiable set of children names, Object.
    */
   public <E> Set<E> getChildrenNames(Fqn<E> fqn)
   {
      MethodCall m = MethodCallFactory.create(MethodDeclarations.getChildrenNamesMethodLocal_id, fqn);
      Set<E> retval = null;
      retval = (Set<E>) invoke(m);
      if (retval != null)
         retval = Collections.unmodifiableSet(new HashSet<E>(retval));
      else
View Full Code Here

TOP

Related Classes of org.jboss.cache.marshall.MethodCall

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.