Search in sources :

Example 1 with WaitDelegatingNonBlockingStore

use of org.infinispan.persistence.support.WaitDelegatingNonBlockingStore in project infinispan by infinispan.

the class TestingUtil method getStoreWait.

@SuppressWarnings({ "cast" })
public static <K, V> WaitDelegatingNonBlockingStore<K, V> getStoreWait(Cache<K, V> cache, int position, boolean unwrapped) {
    NonBlockingStore<K, V> nonBlockingStore = getStore(cache, position, unwrapped);
    KeyPartitioner keyPartitioner = extractComponent(cache, KeyPartitioner.class);
    return new WaitDelegatingNonBlockingStore<>(nonBlockingStore, keyPartitioner);
}
Also used : KeyPartitioner(org.infinispan.distribution.ch.KeyPartitioner) WaitDelegatingNonBlockingStore(org.infinispan.persistence.support.WaitDelegatingNonBlockingStore)

Example 2 with WaitDelegatingNonBlockingStore

use of org.infinispan.persistence.support.WaitDelegatingNonBlockingStore in project infinispan by infinispan.

the class JdbcStringBasedStoreAltMapperTest method createCacheStore.

@BeforeClass
public void createCacheStore() throws PersistenceException {
    ConfigurationBuilder builder = TestCacheManagerFactory.getDefaultCacheConfiguration(false);
    JdbcStringBasedStoreConfigurationBuilder storeBuilder = createJdbcConfig(builder);
    UnitTestDatabaseManager.buildTableManipulation(storeBuilder.table());
    UnitTestDatabaseManager.configureUniqueConnectionFactory(storeBuilder);
    JdbcStringBasedStore jdbcStringBasedStore = new JdbcStringBasedStore();
    cacheStore = new WaitDelegatingNonBlockingStore(jdbcStringBasedStore, SingleSegmentKeyPartitioner.getInstance());
    marshaller = new TestObjectStreamMarshaller(TestDataSCI.INSTANCE);
    cacheStore.startAndWait(PersistenceMockUtil.createContext(getClass(), builder.build(), marshaller));
    tableManager = jdbcStringBasedStore.getTableManager();
}
Also used : ConfigurationBuilder(org.infinispan.configuration.cache.ConfigurationBuilder) JdbcStringBasedStoreConfigurationBuilder(org.infinispan.persistence.jdbc.configuration.JdbcStringBasedStoreConfigurationBuilder) JdbcStringBasedStoreConfigurationBuilder(org.infinispan.persistence.jdbc.configuration.JdbcStringBasedStoreConfigurationBuilder) TestObjectStreamMarshaller(org.infinispan.marshall.TestObjectStreamMarshaller) WaitDelegatingNonBlockingStore(org.infinispan.persistence.support.WaitDelegatingNonBlockingStore) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

WaitDelegatingNonBlockingStore (org.infinispan.persistence.support.WaitDelegatingNonBlockingStore)2 ConfigurationBuilder (org.infinispan.configuration.cache.ConfigurationBuilder)1 KeyPartitioner (org.infinispan.distribution.ch.KeyPartitioner)1 TestObjectStreamMarshaller (org.infinispan.marshall.TestObjectStreamMarshaller)1 JdbcStringBasedStoreConfigurationBuilder (org.infinispan.persistence.jdbc.configuration.JdbcStringBasedStoreConfigurationBuilder)1 BeforeClass (org.testng.annotations.BeforeClass)1