Examples of TestObjectStreamMarshaller


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

   /**
    * @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

      CacheStoreConfig cfg = new DummyInMemoryCacheStore.Cfg()
         .storeName("ChainingCacheLoaderTest_instance1")
         .purgeOnStartup(false)
         .fetchPersistentState(false);
      store1 = new DummyInMemoryCacheStore();
      store1.init(cfg, null, new TestObjectStreamMarshaller());

      ConfigurationBuilder builder = new ConfigurationBuilder();
      LegacyConfigurationAdaptor.adapt(Thread.currentThread().getContextClassLoader(), builder, cfg);
      store.addCacheLoader(store1, builder.build().loaders().cacheLoaders().get(0));

      store2 = new DummyInMemoryCacheStore();
      // set store2 up for streaming
      cfg = new DummyInMemoryCacheStore.Cfg()
         .storeName("ChainingCacheLoaderTest_instance2")
         .purgeOnStartup(false)
         .fetchPersistentState(true);
      store2.init(cfg, null, new TestObjectStreamMarshaller());

      builder = new ConfigurationBuilder();
      LegacyConfigurationAdaptor.adapt(Thread.currentThread().getContextClassLoader(), builder, cfg);
      store.addCacheLoader(store2, builder.build().loaders().cacheLoaders().get(0));
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

   private AsyncStore createAsyncStore() throws CacheLoaderException {
      DummyInMemoryCacheStore backendStore = createBackendStore("async2");
      AsyncStoreConfig asyncCfg = new AsyncStoreConfig();
      asyncCfg.modificationQueueSize(0);
      AsyncStore store = new AsyncStore(backendStore, asyncCfg);
      store.init(backendStore.getCacheStoreConfig(), null, new TestObjectStreamMarshaller());
      store.start();
      return store;
   }
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

      return store;
   }

   private DummyInMemoryCacheStore createBackendStore(String storeName) throws CacheLoaderException {
      DummyInMemoryCacheStore store = new DummyInMemoryCacheStore();
      store.init(new DummyInMemoryCacheStore.Cfg(storeName), null, new TestObjectStreamMarshaller());
      store.start();
      return store;
   }
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

   private AsyncStore createAsyncStore() throws CacheLoaderException {
      DummyInMemoryCacheStore backendStore = createBackendStore("async2");
      AsyncStoreConfig asyncCfg = new AsyncStoreConfig();
      asyncCfg.modificationQueueSize(0);
      AsyncStore store = new AsyncStore(backendStore, asyncCfg);
      store.init(backendStore.getCacheStoreConfig(), null, new TestObjectStreamMarshaller());
      store.start();
      return store;
   }
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

      return store;
   }

   private DummyInMemoryCacheStore createBackendStore(String storeName) throws CacheLoaderException {
      DummyInMemoryCacheStore store = new DummyInMemoryCacheStore();
      store.init(new DummyInMemoryCacheStore.Cfg(storeName), null, new TestObjectStreamMarshaller());
      store.start();
      return store;
   }
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

   @Override
   public void init(CacheLoaderConfig config, Cache cache, StreamingMarshaller m) throws CacheLoaderException {
      super.init(config, cache, m);
      this.config = (Cfg) config;
      storeName = this.config.getStoreName();
      if (marshaller == null) marshaller = new TestObjectStreamMarshaller();
   }
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

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

   StreamingMarshaller getMarshaller() {
      return new TestObjectStreamMarshaller(false);
   }
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.