Examples of Fqn


Examples of com.dotcms.repackage.org.jboss.cache.Fqn

    Cache cache = getCache(group);


    if(isDiskCache(group)){
      try {
        diskCache.remove(new Fqn(group));
      } catch (Exception e) {
        Logger.debug(DotGuavaCacheAdministratorImpl.class,e.getMessage(),e);
      }
    }
    cache.invalidateAll();

Examples of org.infinispan.tree.Fqn

     * @param ns
     * @param pLIDMId
     * @param id
     */
    void putGtnGroupId(String ns, String pLIDMId, String id) {
        Fqn nodeFqn = getFqn(ns, NODE_GTN_GROUP_ID, pLIDMId);

        Node ioNode = addNode(nodeFqn);

        if (ioNode != null) {
            ioNode.put(NODE_OBJECT_KEY, id);

Examples of org.jboss.cache.Fqn

  @NodeModified
  @NodeMoved
  @NodeLoaded
  @NodeEvicted
  public synchronized void cacheChanged(NodeEvent ne) {
      Fqn fqn = ne.getFqn();
      if (fqn.isChildOrEquals(rootFqn)) {
        listener.cacheChanged();
      }
  }

Examples of org.jboss.cache.Fqn

   {
      Node<Object, Object> root1 = cache1.getRoot();
      Node<Object, Object> root2 = cache2.getRoot();

      // this fqn is relative, but since it is from the root it may as well be absolute
      Fqn fqn = Fqn.fromString("/test/fqn");
      cache1.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
      cache1.put(fqn, "key", "value");
      assertEquals("value", cache1.get(fqn, "key"));
      cache2.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
      cache2.put(fqn, "key", "value");
      assertEquals("value", cache2.get(fqn, "key"));

      assertEquals(true, cache1.removeNode(fqn));
      assertFalse(root1.hasChild(fqn));
      Node<Object, Object> remoteNode = root2.getChild(fqn);
      CacheLoaderInvalidationTest.checkRemoteNodeIsRemoved(remoteNode);
      assertEquals(false, cache1.removeNode(fqn));

      Fqn child = Fqn.fromString("/test/fqn/child");
      cache1.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
      cache1.put(child, "key", "value");
      assertEquals("value", cache1.get(child, "key"));
      cache2.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
      cache2.put(child, "key", "value");

Examples of org.jboss.cache.Fqn

   }

   public void nodeResurrectionTest() throws Exception
   {
      // this fqn is relative, but since it is from the root it may as well be absolute
      Fqn fqn = Fqn.fromString("/test/fqn1");
      cache1.put(fqn, "key", "value");
      assertEquals("value", cache1.get(fqn, "key"));
      assertEquals(null, cache2.get(fqn, "key"));
      // Change the value in order to increment the version if Optimistic is used
      cache1.put(fqn, "key", "newValue");

Examples of org.jboss.cache.Fqn

   {
      Node root1 = cache1.getRoot();
      Node root2 = cache2.getRoot();

      // this fqn is relative, but since it is from the root it may as well be absolute
      Fqn fqn = Fqn.fromString("/test/fqn");
      cache1.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
      root1.addChild(fqn);
      assertEquals(true, root1.hasChild(fqn));
      cache2.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
      root1.addChild(fqn);
      assertEquals(true, root1.hasChild(fqn));

      Fqn child = Fqn.fromRelativeElements(fqn, "child");
      cache1.putForExternalRead(child, "key", "value");
      cache2.putForExternalRead(child, "key", "value");
      assertEquals("value", cache1.get(child, "key"));
      assertEquals("value", cache2.get(child, "key"));

Examples of org.jboss.cache.Fqn

      assertEquals(true, root2.hasChild(fqn));
   }

   public void deleteNonExistentTest() throws Exception
   {
      Fqn fqn = Fqn.fromString("/a/b");

      assertNull("Should be null", cache1.getNode(fqn));
      assertNull("Should be null", cache2.getNode(fqn));

      cache1.putForExternalRead(fqn, "key", "value");

Examples of org.jboss.cache.Fqn

   }
  
   protected void move(boolean supressEventNotification)
   {
      assertEquals("Event log should be empty", Collections.emptyList(), eventLog.events);
      Fqn newParent = Fqn.fromString("/a");
      cache.put(fqn, "key", "value");
      cache.put(newParent, "key", "value");

      Node<Object, Object> n1 = cache.getRoot().getChild(fqn);
      Node<Object, Object> n2 = cache.getRoot().getChild(newParent);
      eventLog.events.clear();// clear events
      assertEquals("Event log should be empty", Collections.emptyList(), eventLog.events);

      if (supressEventNotification)
      {
         setSuppressEventNotification();
      }
      cache.move(n1.getFqn(), n2.getFqn());
      //expected
      Fqn newFqn = Fqn.fromRelativeElements(newParent, fqn.getLastElement());
      List<Event> expected = new ArrayList<Event>();

      if (!supressEventNotification)
      {
         if (optLocking)

Examples of org.jboss.cache.Fqn

   }

   public void testTxMove() throws Exception
   {
      assertEquals("Event log should be empty", Collections.emptyList(), eventLog.events);
      Fqn newParent = Fqn.fromString("/a");
      cache.put(fqn, "key", "value");
      cache.put(newParent, "key", "value");

      Node<Object, Object> n1 = cache.getRoot().getChild(fqn);
      Node<Object, Object> n2 = cache.getRoot().getChild(newParent);
      eventLog.events.clear();// clear events
      assertEquals("Event log should be empty", Collections.emptyList(), eventLog.events);

      tm.begin();
      Transaction tx = tm.getTransaction();
      cache.move(n1.getFqn(), n2.getFqn());
      //expected
      Fqn newFqn = Fqn.fromRelativeElements(newParent, fqn.getLastElement());
      List<Event> expected = new ArrayList<Event>();
      expected.add(new EventImpl(false, cache, null, null, null, tx, true, null, false, null, TRANSACTION_REGISTERED));
      expected.add(new EventImpl(true, cache, null, null, fqn, tx, true, newFqn, false, null, NODE_MOVED));
      expected.add(new EventImpl(false, cache, null, null, fqn, tx, true, newFqn, false, null, NODE_MOVED));

Examples of org.jboss.cache.Fqn

   }
  
   protected void txMove(boolean supressEventNotification) throws Exception
   {
      assertEquals("Event log should be empty", Collections.emptyList(), eventLog.events);
      Fqn newParent = Fqn.fromString("/a");
      cache.put(fqn, "key", "value");
      cache.put(newParent, "key", "value");

      Node<Object, Object> n1 = cache.getRoot().getChild(fqn);
      Node<Object, Object> n2 = cache.getRoot().getChild(newParent);
      eventLog.events.clear();// clear events
      assertEquals("Event log should be empty", Collections.emptyList(), eventLog.events);

      if (supressEventNotification)
      {
         setSuppressEventNotification();
      }
      tm.begin();
      Transaction tx = tm.getTransaction();
      if (supressEventNotification)
      {
         setSuppressEventNotification();
      }     
      cache.move(n1.getFqn(), n2.getFqn());
      //expected
      Fqn newFqn = Fqn.fromRelativeElements(newParent, fqn.getLastElement());
      List<Event> expected = new ArrayList<Event>();
      if (!supressEventNotification)
      {      
         expected.add(new EventImpl(false, cache, null, null, null, tx, true, null, false, null, TRANSACTION_REGISTERED));
         expected.add(new EventImpl(true, cache, null, null, fqn, tx, true, newFqn, false, null, NODE_MOVED));
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.