Package org.infinispan.container

Examples of org.infinispan.container.DataContainer.keySet()


      assertSerializationCounts(1, 0);

      DataContainer dc1 = TestingUtil.extractComponent(cache1, DataContainer.class);

      Object o = dc1.keySet().iterator().next();
      assertTrue(o instanceof MarshalledValue);
      MarshalledValue mv = (MarshalledValue) o;
      assertSerialized(mv);

      assertEquals("value", cache1.get(key));
View Full Code Here


      assertSerialized(mv);


      // now on cache 2
      DataContainer dc2 = TestingUtil.extractComponent(cache2, DataContainer.class);
      o = dc2.keySet().iterator().next();
      assertTrue(o instanceof MarshalledValue);
      mv = (MarshalledValue) o;
      assertSerialized(mv);
      assertEquals("value", cache2.get(key));
      assertSerializationCounts(3, 0);
View Full Code Here

   /**
    * Pushes the state of a specific cache by reading the cache's data and putting in the cache store.
    */
   protected void pushState(final Cache cache) throws Exception {
      DataContainer dc = cache.getAdvancedCache().getDataContainer();
      Set<Object> keys = dc.keySet();
      for (Object k : keys) {
         InternalCacheEntry entry = dc.get(k);
         if (entry != null) {
            MarshalledEntryImpl me = new MarshalledEntryImpl(entry.getKey(), entry.getValue(),
                                                             internalMetadata(entry), ctx.getMarshaller());
View Full Code Here

    *
    * @throws Exception if there's any issues reading the data from the cache or pushing data to the cache store.
    */
   protected void pushState(final Cache cache) throws Exception {
      DataContainer dc = cache.getAdvancedCache().getDataContainer();
      Set keys = dc.keySet();
      InternalCacheEntry entry;
      for (Object k : keys) if ((entry = dc.get(k)) != null) store(entry);
   }


View Full Code Here

               }
            });
         }
         // in case we have stores, we have to process key/values from there as well
         if (persistenceManager != null && !inputKeysSpecified) {
               AdvancedCacheLoader.KeyFilter<?> keyFilter = new CompositeFilter(new PrimaryOwnerFilter(cdl), new CollectionKeyFilter(dc.keySet()));
               persistenceManager.processOnAllStores(keyFilter, new MapReduceCacheLoaderTask(mapper, collector),
                     true, false);
         }
      } finally {
         if (log.isTraceEnabled()) {
View Full Code Here

    *
    * @throws Exception if there's any issues reading the data from the cache or pushing data to the cache store.
    */
   protected void pushState(final Cache cache) throws Exception {
      DataContainer dc = cache.getAdvancedCache().getDataContainer();
      Set keys = dc.keySet();
      InternalCacheEntry entry;
      for (Object k : keys) if ((entry = dc.get(k)) != null) store(entry);
   }


View Full Code Here

    *
    * @throws Exception if there's any issues reading the data from the cache or pushing data to the cache store.
    */
   protected void pushState(final Cache cache) throws Exception {
      DataContainer dc = cache.getAdvancedCache().getDataContainer();
      Set keys = dc.keySet();
      InternalCacheEntry entry;
      for (Object k : keys) if ((entry = dc.get(k)) != null) store(entry);
   }


View Full Code Here

      assertSerializationCounts(1, 0);

      DataContainer dc1 = TestingUtil.extractComponent(cache1, DataContainer.class);

      Object o = dc1.keySet().iterator().next();
      assert o instanceof MarshalledValue;
      MarshalledValue mv = (MarshalledValue) o;
      assertDeserialized(mv);

      assert cache1.get(key).equals("value");
View Full Code Here

      assertSerialized(mv);


      // now on cache 2
      DataContainer dc2 = TestingUtil.extractComponent(cache2, DataContainer.class);
      o = dc2.keySet().iterator().next();
      assert o instanceof MarshalledValue;
      mv = (MarshalledValue) o;
      assertSerialized(mv);
      assert cache2.get(key).equals("value");
      assertSerializationCounts(2, 1);
View Full Code Here

    *
    * @throws Exception if there's any issues reading the data from the cache or pushing data to the cache store.
    */
   protected void pushState(final Cache<Object, Object> cache) throws Exception {
      DataContainer dc = cache.getAdvancedCache().getDataContainer();
      Set<Object> keys = dc.keySet();
      InternalCacheEntry entry;
      for (Object k : keys) if ((entry = dc.get(k)) != null) store(entry);
   }


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.