Examples of Fqn


Examples of org.jboss.cache.Fqn

      assertEquals("value", cache2.get(fqn, "key"));
   }

   public void testPessimisticTransactionalWithCacheLoader() throws Exception
   {
      Fqn fqn = Fqn.fromString("/a/b");
      TransactionManager mgr = cache1.getTransactionManager();
      assertNull("Should be null", cache1.get(fqn, "key"));
      assertNull("Should be null", cache2.get(fqn, "key"));
      mgr.begin();
      cache1.put(fqn, "key", "value");

Examples of org.jboss.cache.Fqn

   {
      Fqn<String> fqn = Fqn.fromElements(FqnUtil.JSESSION, contextHostName, sessionId);
      Map<Object, Object> owned = owner.getData(fqn);
      assert owned != null : "owned is null";
     
      Fqn bFqn = new BuddyFqnTransformer().getBackupFqn(owner.getLocalAddress(), fqn);
      Map<Object, Object> backed = owner.getData(fqn);
      assert backed != null : "backed is null";
     
      assert owned.size() == backed.size() : "sizes differ; owned = " + owned.size() + " backed = " + backed.size();
     

Examples of org.jboss.cache.Fqn

   }

   public void testNotifyNodeMoved()
   {
      assert allEventsListener.nodeMovedEvent == null;
      Fqn second = Fqn.fromString("/a/s/f");
      notifier.notifyNodeMoved(fqn, second, true, ctx);
      assert allEventsListener.nodeMovedEvent != null;
      assert allEventsListener.nodeMovedEvent.getFqn().equals(fqn);
      assert allEventsListener.nodeMovedEvent.getTargetFqn().equals(second);
      assert allEventsListener.nodeMovedEvent.getType() == Event.Type.NODE_MOVED;

Examples of org.jboss.cache.Fqn

            {Fqn.fromString("/a/b/c/d///"), true},
            {Fqn.fromString("/a/b/c/:/e"), false},};

      for (Object[] aData : data)
      {
         Fqn fqn = (Fqn) aData[0];
         boolean expected = (Boolean) aData[1];
         assertEquals(fqn.toString(), expected, fcl.isCharacterPortableTree(fqn));
      }
   }

Examples of org.jboss.cache.Fqn

      Object custom1 = clazz.newInstance();

      clazz = cl2.loadFoo();
      Object custom2 = clazz.newInstance();

      Fqn base = Fqn.fromString("/aop");
      Fqn fqn = Fqn.fromRelativeElements(base, custom1);
      replListener2.expect(PutKeyValueCommand.class);
      cache1.put(fqn, "key", "value");
      replListener2.waitForReplicationToOccur();

      Fqn fqn2 = Fqn.fromRelativeElements(base, custom2);
      Object val = cache2.get(fqn2, "key");
      assertEquals("value", val);
   }

Examples of org.jboss.cache.Fqn

      c2 = null;
   }

   public void testUseOfInvalidRegion()
   {
      Fqn fqn = Fqn.fromString("/a/b/c/d");
      c1.getRegion(fqn.getParent(), true).registerContextClassLoader(getClass().getClassLoader());
      c2.getRegion(fqn.getParent(), true).registerContextClassLoader(getClass().getClassLoader());

      replListener2.expect(PutKeyValueCommand.class);
      // write something; will cause a stale region to be stored in C2's cache marshaller
      c1.put(fqn, "k", "v");
      assert c1.get(fqn, "k").equals("v");

      replListener2.waitForReplicationToOccur(250);

      // assert that this made it to c2
      assert c2.get(fqn, "k").equals("v");

      // c2's cache marshaller's thread local would be polluted now.

      // restart c1 so that it forces a state transfer from c2
      c1.destroy();
      c1.create();
      Region r = c1.getRegion(fqn.getParent(), true);
      r.registerContextClassLoader(getClass().getClassLoader());
      r.deactivate();
      c1.start();

      TestingUtil.blockUntilViewsReceived(60000, c1, c2);

Examples of org.jboss.cache.Fqn

      r = null;
   }

   public void testGetAllMarshallingRegions()
   {
      Fqn fqn1 = Fqn.fromString("/a/b/c");
      Fqn fqn2 = Fqn.fromString("/a/b");
      Fqn fqn3 = Fqn.fromString("/aop");

      List<Region> expected = new ArrayList<Region>(4);

      Region region = r.getRegion(DEFAULT_REGION, true);
      region.registerContextClassLoader(getClass().getClassLoader());

Examples of org.jboss.cache.Fqn

      assertFalse("Should not be expecting any more regions", expectedRegions.hasNext());
   }

   public void testNoDefaultRegion()
   {
      Fqn fqn1 = Fqn.fromString("/a/b/c");
      Fqn fqn2 = Fqn.fromString("/a/b/");

      r.getRegion(fqn1, true);
      r.getRegion(fqn2, true);

      Region region = null;

Examples of org.jboss.cache.Fqn

      return cache;
   }

   public void testTransferToInactiveRegion()
   {
      Fqn f = Fqn.fromString("/a/b");

      caches.get(0).put(f, "k", "v");

      assertEquals("v", caches.get(0).get(f, "k"));
      assertEquals("v", caches.get(1).get(f, "k"));

Examples of org.jboss.cache.Fqn

      configureCache(
            "cache.async.put=false\n" +
                  "cache.async.pollWait=10000\n" +
                  "", true);
      CacheLoader loader = cache.getCacheLoaderManager().getCacheLoader();
      Fqn fqn = Fqn.fromString("/a/b/c/d");
      HashMap<Object, Object> map = new HashMap<Object, Object>();
      map.put("c", "d");
      // Three kinds of puts!
      Modification mod = new Modification(Modification.ModificationType.PUT_KEY_VALUE, fqn, "e", "f");
      loader.put(fqn, map);
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.