Package org.jboss.cache.search.test

Examples of org.jboss.cache.search.test.Person


   public void setUpBeforeTest() throws ParseException
   {
      Cache coreCache = new DefaultCacheFactory().createCache();
      searchableCache = new SearchableCacheFactory().createSearchableCache(coreCache, Person.class);

      person1 = new Person();
      person2 = new Person();
      person3 = new Person();
      person4 = new Person();
      person5 = new Person();
      person6 = new Person();
      person7 = new Person();
      person8 = new Person();
      person9 = new Person();
      person10 = new Person();

      person1.setBlurb("cat");
      person2.setBlurb("cat");
      person3.setBlurb("cat");
      person4.setBlurb("cat");
View Full Code Here


         // we still haven't got the cache views we want!!
         throw new RuntimeException("Unable to initialise cluster!");
      }


      person1 = new Person();
      person1.setName("Navin Surtani");
      person1.setBlurb("Likes playing WoW");

      person2 = new Person();
      person2.setName("BigGoat");
      person2.setBlurb("Eats grass");

      person3 = new Person();
      person3.setName("MiniGoat");
      person3.setBlurb("Eats cheese");

      //Put the 3 created objects in the searchableCache1.
View Full Code Here

      assert found.size() == 1;

      if(found.get(0) == null)
      {
         if(log.isTraceEnabled()) log.warn("found.get(0) is null");
         Person p1 = (Person) searchableCache2.get("/a/b/c", key1);
                         http://wiki.jboss.org/wiki/JBossCacheSearchable
         if(p1 == null)
         {
            if(log.isTraceEnabled()) log.warn("Person p1 is null in sc2 and cannot actually see the data of person1 in sc1");
         }

         else
         {
            if(log.isTraceEnabled()) log.trace("p1 name is  " + p1.getName());

         }
      }

View Full Code Here

      assert found.size() == 2 : "Size of list should be 2";
      assert found.contains(person2);
      assert found.contains(person3);
      assert !found.contains(person4) : "This should not contain object person4";

      person4 = new Person();
      person4.setName("Mighty Goat");
      person4.setBlurb("Also eats grass");

      searchableCache1.put(Fqn.fromString("/r/a/m/"), "Ram", person4);
View Full Code Here

   public void setUp()
   {
      Cache coreCache = new DefaultCacheFactory().createCache();
      searchableCache = new SearchableCacheFactory().createSearchableCache(coreCache, Person.class);

      person1 = new Person();
      person1.setName("Navin Surtani");
      person1.setBlurb("Likes playing WoW");

      person2 = new Person();
      person2.setName("Big Goat");
      person2.setBlurb("Eats grass");

      person3 = new Person();
      person3.setName("Mini Goat");
      person3.setBlurb("Eats cheese");

      person5 = new Person();
      person5.setName("Smelly Cat");
      person5.setBlurb("Eats fish");

      //Put the 3 created objects in the searchableCache.
      searchableCache.put(Fqn.fromString("/a/b/c"), key1, person1);
View Full Code Here

      assert found.size() == 2 : "Size of list should be 2";
      assert found.contains(person2);
      assert found.contains(person3);
      assert !found.contains(person4) : "This should not contain object person4";

      person4 = new Person();
      person4.setName("Mighty Goat");
      person4.setBlurb("Also eats grass");

      searchableCache.put(Fqn.fromString("/r/a/m/"), "Ram", person4);
View Full Code Here

   public void setUp()
   {
      Cache coreCache = new DefaultCacheFactory().createCache();
      searchableCache = new SearchableCacheFactory().createSearchableCache(coreCache, Person.class);

      person1 = new Person();
      person1.setName("Navin Surtani");
      person1.setBlurb("Likes playing WoW");

      person2 = new Person();
      person2.setName("Big Goat");
      person2.setBlurb("Eats grass");

      person3 = new Person();
      person3.setName("Mini Goat");
      person3.setBlurb("Eats cheese");

      person5 = new Person();
      person5.setName("Smelly Cat");
      person5.setBlurb("Eats fish");

      //Put the 3 created objects in the searchableCache.
      searchableCache.put(Fqn.fromString("/a/b/c"), key1, person1);
View Full Code Here

      assert found.size() == 2 : "Size of list should be 2";
      assert found.contains(person2);
      assert found.contains(person3);
      assert !found.contains(person4) : "This should not contain object person4";

      person4 = new Person();
      person4.setName("Mighty Goat");
      person4.setBlurb("Also eats grass");

      searchableCache.put(Fqn.fromString("/r/a/m/"), "Ram", person4);
View Full Code Here

         // we still haven't got the cache views we want!!
         throw new RuntimeException("Unable to initialise cluster!");
      }


      person1 = new Person();
      person1.setName("Navin Surtani");
      person1.setBlurb("Likes playing WoW");

      person2 = new Person();
      person2.setName("BigGoat");
      person2.setBlurb("Eats grass");

      person3 = new Person();
      person3.setName("MiniGoat");
      person3.setBlurb("Eats cheese");

      //Put the 3 created objects in the searchableCache1.
View Full Code Here

      assert found.size() == 1;

      if(found.get(0) == null)
      {
         if(log.isTraceEnabled()) log.warn("found.get(0) is null");
         Person p1 = (Person) searchableCache2.get("/a/b/c", key1);
                         http://wiki.jboss.org/wiki/JBossCacheSearchable
         if(p1 == null)
         {
            if(log.isTraceEnabled()) log.warn("Person p1 is null in sc2 and cannot actually see the data of person1 in sc1");
         }

         else
         {
            if(log.isTraceEnabled()) log.trace("p1 name is  " + p1.getName());

         }
      }

View Full Code Here

TOP

Related Classes of org.jboss.cache.search.test.Person

Copyright © 2018 www.massapicom. 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.