Package org.infinispan.cli.interpreter

Examples of org.infinispan.cli.interpreter.Interpreter.execute()


   public void testDangling() throws Exception {
      GlobalComponentRegistry gcr = TestingUtil.extractGlobalComponentRegistry(this.cacheManager);
      Interpreter interpreter = gcr.getComponent(Interpreter.class);
      String sessionId = interpreter.createSessionId(BasicCacheContainer.DEFAULT_CACHE_NAME);
      interpreter.execute(sessionId, "begin; put 'a' 'a';");
      assert cache.getAdvancedCache().getTransactionManager().getTransaction() == null;
      assert !cache.containsKey("a");
      interpreter.execute(sessionId, "start; put 'a' 'a';");
      assert cache.getAdvancedCache().getBatchContainer().getBatchTransaction() == null;
      assert !cache.containsKey("a");
View Full Code Here


      Interpreter interpreter = gcr.getComponent(Interpreter.class);
      String sessionId = interpreter.createSessionId(BasicCacheContainer.DEFAULT_CACHE_NAME);
      interpreter.execute(sessionId, "begin; put 'a' 'a';");
      assert cache.getAdvancedCache().getTransactionManager().getTransaction() == null;
      assert !cache.containsKey("a");
      interpreter.execute(sessionId, "start; put 'a' 'a';");
      assert cache.getAdvancedCache().getBatchContainer().getBatchTransaction() == null;
      assert !cache.containsKey("a");
   }

   public void testRemove() throws Exception {
View Full Code Here

   public void testRemove() throws Exception {
      GlobalComponentRegistry gcr = TestingUtil.extractGlobalComponentRegistry(this.cacheManager);
      Interpreter interpreter = gcr.getComponent(Interpreter.class);
      String sessionId = interpreter.createSessionId(BasicCacheContainer.DEFAULT_CACHE_NAME);
      interpreter.execute(sessionId, "put 'a' 'a';");
      Object a = cache.get("a");
      assert a.equals("a");
      interpreter.execute(sessionId, "remove 'a';");
      assert !cache.containsKey("a");
      interpreter.execute(sessionId, "put 'b' 'b';");
View Full Code Here

      Interpreter interpreter = gcr.getComponent(Interpreter.class);
      String sessionId = interpreter.createSessionId(BasicCacheContainer.DEFAULT_CACHE_NAME);
      interpreter.execute(sessionId, "put 'a' 'a';");
      Object a = cache.get("a");
      assert a.equals("a");
      interpreter.execute(sessionId, "remove 'a';");
      assert !cache.containsKey("a");
      interpreter.execute(sessionId, "put 'b' 'b';");
      Object b = cache.get("b");
      assert b.equals("b");
      interpreter.execute(sessionId, "remove 'b' 'c';");
View Full Code Here

      interpreter.execute(sessionId, "put 'a' 'a';");
      Object a = cache.get("a");
      assert a.equals("a");
      interpreter.execute(sessionId, "remove 'a';");
      assert !cache.containsKey("a");
      interpreter.execute(sessionId, "put 'b' 'b';");
      Object b = cache.get("b");
      assert b.equals("b");
      interpreter.execute(sessionId, "remove 'b' 'c';");
      assert cache.containsKey("b");
   }
View Full Code Here

      interpreter.execute(sessionId, "remove 'a';");
      assert !cache.containsKey("a");
      interpreter.execute(sessionId, "put 'b' 'b';");
      Object b = cache.get("b");
      assert b.equals("b");
      interpreter.execute(sessionId, "remove 'b' 'c';");
      assert cache.containsKey("b");
   }

   public void testReplace() throws Exception {
      GlobalComponentRegistry gcr = TestingUtil.extractGlobalComponentRegistry(this.cacheManager);
View Full Code Here

   public void testReplace() throws Exception {
      GlobalComponentRegistry gcr = TestingUtil.extractGlobalComponentRegistry(this.cacheManager);
      Interpreter interpreter = gcr.getComponent(Interpreter.class);
      String sessionId = interpreter.createSessionId(BasicCacheContainer.DEFAULT_CACHE_NAME);
      interpreter.execute(sessionId, "put 'a' 'a';");
      Object a = cache.get("a");
      assert a.equals("a");
      interpreter.execute(sessionId, "replace 'a' 'b';");
      a = cache.get("a");
      assert a.equals("b");
View Full Code Here

      Interpreter interpreter = gcr.getComponent(Interpreter.class);
      String sessionId = interpreter.createSessionId(BasicCacheContainer.DEFAULT_CACHE_NAME);
      interpreter.execute(sessionId, "put 'a' 'a';");
      Object a = cache.get("a");
      assert a.equals("a");
      interpreter.execute(sessionId, "replace 'a' 'b';");
      a = cache.get("a");
      assert a.equals("b");
      interpreter.execute(sessionId, "replace 'a' 'b' 'c';");
      a = cache.get("a");
      assert a.equals("c");
View Full Code Here

      Object a = cache.get("a");
      assert a.equals("a");
      interpreter.execute(sessionId, "replace 'a' 'b';");
      a = cache.get("a");
      assert a.equals("b");
      interpreter.execute(sessionId, "replace 'a' 'b' 'c';");
      a = cache.get("a");
      assert a.equals("c");
      interpreter.execute(sessionId, "replace 'a' 'b' 'd';");
      a = cache.get("a");
      assert a.equals("c");
View Full Code Here

      a = cache.get("a");
      assert a.equals("b");
      interpreter.execute(sessionId, "replace 'a' 'b' 'c';");
      a = cache.get("a");
      assert a.equals("c");
      interpreter.execute(sessionId, "replace 'a' 'b' 'd';");
      a = cache.get("a");
      assert a.equals("c");
   }

   public void testCreateLocal() throws Exception {
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.