Examples of TestObjectStreamMarshaller


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, getCache(), 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, getCache(), 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

      JdbcStringBasedCacheStore store = (JdbcStringBasedCacheStore) cacheStore;
      return store.getConnectionFactory();
   }

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

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

      int value = UnitTestDatabaseManager.rowCount(connectionFactory, tableName);
      assert value == rowCount : "Expected " + rowCount + " rows, actual value is " + value;
   }

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

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

   public void testNotCreateConnectionFactory() throws Exception {
      JdbcBinaryCacheStore jdbcBucketCacheStore = new JdbcBinaryCacheStore();
      JdbcBinaryCacheStoreConfig config = new JdbcBinaryCacheStoreConfig(false);
      config.setCreateTableOnStart(false);
      jdbcBucketCacheStore.init(config, new CacheImpl("aName"), new TestObjectStreamMarshaller());
      jdbcBucketCacheStore.start();
      assert jdbcBucketCacheStore.getConnectionFactory() == null;

      /* this will make sure that if a method like stop is called on the connection then it will barf an exception */
      ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
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

        cfg = null;
        cs = null;
    }

    void start() throws DatabaseException, CacheLoaderException {
        cs.init(cfg, factory, cache, new TestObjectStreamMarshaller());
        expect(cache.getName()).andReturn("cache");
    }
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

      javaCatalog = new StoredClassCatalog(catalogDb);

      EntryBinding storedEntryKeyBinding =
            new SerialBinding(javaCatalog, Object.class);
      EntryBinding storedEntryValueBinding =
            new InternalCacheEntryBinding(new TestObjectStreamMarshaller());

      storedEntriesDb = env.openDatabase(null, STORED_ENTRIES, dbConfig);

      cacheMap = new StoredMap<Object, InternalCacheEntry>(storedEntriesDb, storedEntryKeyBinding,
                                                           storedEntryValueBinding, true);
View Full Code Here

Examples of org.infinispan.marshall.TestObjectStreamMarshaller

      JdbcStringBasedCacheStore store = (JdbcStringBasedCacheStore) cacheStore;
      return store.getConnectionFactory();
   }
  
   protected Marshaller 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.