Examples of TestObjectStreamMarshaller


Examples of org.infinispan.marshall.TestObjectStreamMarshaller

   }

   public void testSkipCacheLoadFlagUsage() throws PersistenceException {
      CountingStore countingCS = getCountingCacheStore();

      store.write(new MarshalledEntryImpl("home", "Vermezzo", null, new TestObjectStreamMarshaller()));
      store.write(new MarshalledEntryImpl("home-second", "Newcastle Upon Tyne", null, new TestObjectStreamMarshaller()));

      assert countingCS.numLoads == 0;
      //load using SKIP_CACHE_LOAD should not find the object in the store
      assert cache.getAdvancedCache().withFlags(Flag.SKIP_CACHE_LOAD).get("home") == null;
      assert countingCS.numLoads == 0;
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

         .async()
            .enable()
            .threadPoolSize(10);
      DummyInMemoryStore underlying = new DummyInMemoryStore();
      writer = new AdvancedAsyncCacheWriter(underlying);
      TestObjectStreamMarshaller ma = new TestObjectStreamMarshaller();
      DummyInitializationContext ctx = new DummyInitializationContext(dummyCfg.create(), getCache(), ma, new ByteBufferFactoryImpl(), new MarshalledEntryFactoryImpl(ma));
      writer.init(ctx);
      writer.start();
      loader = new AdvancedAsyncCacheLoader(underlying, writer.getState());
      loader.init(ctx);
      loader.start();
      underlying.init(ctx);
      underlying.start();
      testObjectStreamMarshaller = new TestObjectStreamMarshaller(false);
   }
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

   /**
    * @return a mock marshaller for use with the cache store impls
    */
   protected StreamingMarshaller getMarshaller() {
      return new TestObjectStreamMarshaller(false);
   }
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

      store.start();
      return store;
   }

   private TestObjectStreamMarshaller marshaller() {
      return new TestObjectStreamMarshaller();
   }
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

      }
   }

   public void testStoreSizeExceeded() throws Exception {
      assertStoreSize(0, 0);
      store.write(new MarshalledEntryImpl(1, "v1", null, new TestObjectStreamMarshaller()));
      store.write(new MarshalledEntryImpl(2, "v2", null, new TestObjectStreamMarshaller()));
      assertStoreSize(1, 1);
   }
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

   Cache getCache() {
      return BaseStoreTest.mockCache("mockCache-" + getClass().getName());
   }

   StreamingMarshaller getMarshaller() {
      return new TestObjectStreamMarshaller(false);
   }
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

      });
   }

   public void testConfigureMarshaller() {
      GlobalConfigurationBuilder gc = new GlobalConfigurationBuilder();
      gc.serialization().marshaller(new TestObjectStreamMarshaller());
      withCacheManager(new CacheManagerCallable(
            createCacheManager(gc, new ConfigurationBuilder())) {
         @Override
         public void call() {
            cm.getCache();
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

      underlying.start();
   }

   @BeforeMethod
   public void createMarshaller() {
      marshaller = new TestObjectStreamMarshaller();
   }
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

      });
   }

   public void testConfigureMarshaller() {
      GlobalConfigurationBuilder gc = new GlobalConfigurationBuilder();
      TestObjectStreamMarshaller marshaller = new TestObjectStreamMarshaller();
      gc.serialization().marshaller(marshaller);
      withCacheManager(new CacheManagerCallable(
            createCacheManager(gc, new ConfigurationBuilder())) {
         @Override
         public void call() {
            cm.getCache();
         }
      });
      marshaller.stop();
   }
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

            .persistence()
               .addStore(SingleFileStoreConfigurationBuilder.class)
                  .location(this.tmpDirectory)
                  .maxEntries(1)
                  .create();
      marshaller = new TestObjectStreamMarshaller();
      store.init(new DummyInitializationContext(fileStoreConfiguration, getCache(), marshaller,
                                                new ByteBufferFactoryImpl(),
                                                new MarshalledEntryFactoryImpl(marshaller)));
      store.start();
   }
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.