Package org.jboss.cache

Examples of org.jboss.cache.CacheSPI.peek()


      modifier.removeNode(parent);

      // assert that tombstones exist on both instances
      assert modifierImpl.peek(parent, true, true) != null;
      assert observerImpl.peek(parent, true, true) != null;
      assert modifierImpl.peek(parent, false, false) == null;
      assert observerImpl.peek(parent, false, false) == null;

      // make sure this does not exist in the loader; since it HAS been removed
      assert loader.get(parent) == null;
View Full Code Here


      // assert that tombstones exist on both instances
      assert modifierImpl.peek(parent, true, true) != null;
      assert observerImpl.peek(parent, true, true) != null;
      assert modifierImpl.peek(parent, false, false) == null;
      assert observerImpl.peek(parent, false, false) == null;

      // make sure this does not exist in the loader; since it HAS been removed
      assert loader.get(parent) == null;

      NodeSPI observerNode = (NodeSPI) observer.getRoot().getChild(parent);
View Full Code Here

      observerNode = (NodeSPI) observer.getRoot().getChild(parent);
      assert observerNode == null : "Should be null";

      NodeSPI modifierTombstone = modifierImpl.peek(parent, true, true);
      NodeSPI observerTombstone = observerImpl.peek(parent, true, true);

      assert modifierTombstone != null : "Tombstone should still exist";
      assert observerTombstone != null : "Tombstone should still exist";

      assert !modifierTombstone.isValid() : "Should not be valid";
View Full Code Here

      if (isOptimistic() && invalidation)
      {
         // if we are using optimistic invalidation then we should see tombstones.  NOT otherwise.
         NodeSPI modifierTombstone = modifierImpl.peek(parent, true, true);
         NodeSPI observerTombstone = observerImpl.peek(parent, true, true);

         assert modifierTombstone != null : "Modifier tombstone should not be null";
         assert observerTombstone != null : "Observer tombstone should not be null";

         assert !modifierTombstone.isValid() : "Should not be valid";
View Full Code Here

      }
      else
      {
         // if we are using pess locking there should be NO tombstones, regardless of replication/invalidation!
         assert modifierImpl.peek(parent, true, true) == null : "Tombstone should not exist";
         assert observerImpl.peek(parent, true, true) == null : "Tombstone should not exist";
      }
   }

   public void testExistenceOfTombstonesWithChildren()
   {
View Full Code Here

      if (isOptimistic() && invalidation)
      {
         // if we are using optimistic invalidation then we should see tombstones.  NOT otherwise.
         NodeSPI modifierParentTombstone = modifierImpl.peek(parent, true, true);
         NodeSPI observerParentTombstone = observerImpl.peek(parent, true, true);
         NodeSPI modifierChildTombstone = modifierImpl.peek(child, true, true);
         NodeSPI observerChildTombstone = observerImpl.peek(child, true, true);

         assert modifierParentTombstone != null : "Modifier parent tombstone should not be null";
         assert observerParentTombstone != null : "Observer parent tombstone should not be null";
View Full Code Here

      {
         // if we are using optimistic invalidation then we should see tombstones.  NOT otherwise.
         NodeSPI modifierParentTombstone = modifierImpl.peek(parent, true, true);
         NodeSPI observerParentTombstone = observerImpl.peek(parent, true, true);
         NodeSPI modifierChildTombstone = modifierImpl.peek(child, true, true);
         NodeSPI observerChildTombstone = observerImpl.peek(child, true, true);

         assert modifierParentTombstone != null : "Modifier parent tombstone should not be null";
         assert observerParentTombstone != null : "Observer parent tombstone should not be null";
         assert modifierChildTombstone != null : "Modifier child tombstone should not be null";
         assert observerChildTombstone != null : "Observer child tombstone should not be null";
View Full Code Here

      }
      else
      {
         // if we are using pess locking there should be NO tombstones, regardless of replication/invalidation!
         assert modifierImpl.peek(parent, true, true) == null : "Tombstone should not exist";
         assert observerImpl.peek(parent, true, true) == null : "Tombstone should not exist";
         assert modifierImpl.peek(child, true, true) == null : "Tombstone should not exist";
         assert observerImpl.peek(child, true, true) == null : "Tombstone should not exist";
      }
   }
}
View Full Code Here

      {
         // if we are using pess locking there should be NO tombstones, regardless of replication/invalidation!
         assert modifierImpl.peek(parent, true, true) == null : "Tombstone should not exist";
         assert observerImpl.peek(parent, true, true) == null : "Tombstone should not exist";
         assert modifierImpl.peek(child, true, true) == null : "Tombstone should not exist";
         assert observerImpl.peek(child, true, true) == null : "Tombstone should not exist";
      }
   }
}
View Full Code Here

      assert second.peek(fqn, false) != null : "Should have data";
      assert second.peek(Fqn.fromRelativeElements(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN, fqnTransformer.getGroupNameFromAddress(first.getLocalAddress())), false) != null : "Should have backup node for second";
      assert second.peek(Fqn.fromRelativeElements(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN, fqnTransformer.getGroupNameFromAddress(second.getLocalAddress())), false) == null : "Should NOT have backup node for self!";

      assert third.peek(fqn, false) == null : "Should not have data";
      assert third.peek(Fqn.fromRelativeElements(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN, fqnTransformer.getGroupNameFromAddress(third.getLocalAddress())), false) == null : "Should NOT have backup node for self!";
      assert third.peek(Fqn.fromRelativeElements(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN, fqnTransformer.getGroupNameFromAddress(second.getLocalAddress())), false) != null : "Should have backup node for second";
      assert third.peek(fqnTransformer.getBackupFqn(second.getLocalAddress(), fqn), false) != null : "Should have backup data";
   }
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.