Examples of Remove


Examples of org.infinispan.loaders.modifications.Remove

   public void testOnePhaseCommit() throws CacheLoaderException {
      List<Modification> mods = new ArrayList<Modification>();
      mods.add(new Store(TestInternalCacheEntryFactory.create("k1", "v1")));
      mods.add(new Store(TestInternalCacheEntryFactory.create("k2", "v2")));
      mods.add(new Remove("k1"));
      GlobalTransaction tx = gtf.newGlobalTransaction(null, true);
      cs.prepare(mods, tx, true);

      assert cs.load("k2").getValue().equals("v2");
      assert !cs.containsKey("k1");
View Full Code Here

Examples of org.infinispan.loaders.modifications.Remove

   public void testTwoPhaseCommit() throws CacheLoaderException {
      List<Modification> mods = new ArrayList<Modification>();
      mods.add(new Store(TestInternalCacheEntryFactory.create("k1", "v1")));
      mods.add(new Store(TestInternalCacheEntryFactory.create("k2", "v2")));
      mods.add(new Remove("k1"));
      GlobalTransaction tx = gtf.newGlobalTransaction(null, false);
      cs.prepare(mods, tx, false);

      assert !cs.containsKey("k1");
      assert !cs.containsKey("k2");
View Full Code Here

Examples of org.infinispan.loaders.modifications.Remove

      cs.store(TestInternalCacheEntryFactory.create("old", "old"));

      List<Modification> mods = new ArrayList<Modification>();
      mods.add(new Store(TestInternalCacheEntryFactory.create("k1", "v1")));
      mods.add(new Store(TestInternalCacheEntryFactory.create("k2", "v2")));
      mods.add(new Remove("k1"));
      mods.add(new Remove("old"));
      GlobalTransaction tx = gtf.newGlobalTransaction(null, false);
      cs.prepare(mods, tx, false);

      assert !cs.containsKey("k1");
      assert !cs.containsKey("k2");
View Full Code Here

Examples of org.infinispan.loaders.modifications.Remove

      cs.store(TestInternalCacheEntryFactory.create("old", "old"));

      List<Modification> mods = new ArrayList<Modification>();
      mods.add(new Store(TestInternalCacheEntryFactory.create("k1", "v1")));
      mods.add(new Store(TestInternalCacheEntryFactory.create("k2", "v2")));
      mods.add(new Remove("k1"));
      mods.add(new Remove("old"));
      final GlobalTransaction tx = gtf.newGlobalTransaction(null, false);
      cs.prepare(mods, tx, false);

      Thread t = new Thread(new Runnable() {
         @Override
View Full Code Here

Examples of org.infinispan.loaders.modifications.Remove

   public void testPropagatingOnePhaseCommit() throws Exception {
      List<Modification> list = new LinkedList<Modification>();
      list.add(new Store(TestInternalCacheEntryFactory.create("k1", "v1")));
      list.add(new Store(TestInternalCacheEntryFactory.create("k2", "v2", lifespan)));
      list.add(new Store(TestInternalCacheEntryFactory.create("k3", "v3")));
      list.add(new Remove("k3"));
      list.add(new Clear());
      list.add(new Store(TestInternalCacheEntryFactory.create("k4", "v4")));
      list.add(new Store(TestInternalCacheEntryFactory.create("k5", "v5", lifespan)));
      list.add(new Store(TestInternalCacheEntryFactory.create("k6", "v6")));
      list.add(new Remove("k6"));
      GlobalTransaction t = gtf.newGlobalTransaction(null, false);
      cs.prepare(list, t, true);

      CacheStore[] allStores = new CacheStore[]{cs, store1, store2}; // for iteration
      for (int i = 1; i < 7; i++) {
View Full Code Here

Examples of org.infinispan.loaders.modifications.Remove

   public void testPropagatingTwoPhaseCommit() throws Exception {
      List<Modification> list = new LinkedList<Modification>();
      list.add(new Store(TestInternalCacheEntryFactory.create("k1", "v1")));
      list.add(new Store(TestInternalCacheEntryFactory.create("k2", "v2", lifespan)));
      list.add(new Store(TestInternalCacheEntryFactory.create("k3", "v3")));
      list.add(new Remove("k3"));
      list.add(new Clear());
      list.add(new Store(TestInternalCacheEntryFactory.create("k4", "v4")));
      list.add(new Store(TestInternalCacheEntryFactory.create("k5", "v5", lifespan)));
      list.add(new Store(TestInternalCacheEntryFactory.create("k6", "v6")));
      list.add(new Remove("k6"));
      GlobalTransaction tx = gtf.newGlobalTransaction(null, false);
      cs.prepare(list, tx, false);

      CacheStore[] allStores = new CacheStore[]{cs, store1, store2}; // for iteration
View Full Code Here

Examples of org.infinispan.loaders.modifications.Remove

                  Store store = (Store) modification;
                  if (store.getStoredEntry().getKey().equals(key))
                     return store;
                  break;
               case REMOVE:
                  Remove remove = (Remove) modification;
                  if (remove.getKey().equals(key))
                     return remove;
                  break;
               default:
                  return null;
            }
View Full Code Here

Examples of org.infinispan.loaders.modifications.Remove

      }

      @Override
      @SuppressWarnings("unchecked")
      public Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command) throws Throwable {
         modifications.add(new Remove(command.getKey()));
         affectedKeys.add(command.getKey());
         return null;
      }
View Full Code Here

Examples of org.infinispan.persistence.modifications.Remove

      put(new Store(entry.getKey(), entry), 1);
   }

   @Override
   public boolean delete(Object key) {
      put(new Remove(key), 1);
      return true;
   }
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.Remove

            assert report != null : "Report was null.";
            assert report.getStatus() == CreateResourceStatus.SUCCESS : "Create was a failure: "
                + report.getErrorMessage();
        } finally {
            Remove r = new Remove("server-group", serverGroupName);
            connection.execute(r);
        }
    }
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.