Search in sources :

Example 1 with SimpleCacheInstance

use of org.commonjava.maven.galley.cache.infinispan.SimpleCacheInstance in project galley by Commonjava.

the class RoutingCacheProviderWrapperTest method prepare.

@Before
public void prepare() throws Exception {
    final File cacheDir = temp.newFolder();
    partylineFac = new PartyLineCacheProviderFactory(cacheDir);
    DefaultCacheManager cacheManager = new DefaultCacheManager();
    SimpleCacheInstance<String, String> cacheInstance = new SimpleCacheInstance<>("test", cacheManager.getCache("simpleNfsCache"));
    SimpleCacheInstance<String, ConcreteResource> testLocalFileCacheInstance = new SimpleCacheInstance<>("testLocalFileCache", cacheManager.getCache("simpleLocalFileCache"));
    fastLocalFac = new FastLocalCacheProviderFactory(cacheDir, temp.newFolder(), cacheInstance, testLocalFileCacheInstance, Executors.newFixedThreadPool(5));
}
Also used : PartyLineCacheProviderFactory(org.commonjava.maven.galley.cache.partyline.PartyLineCacheProviderFactory) DefaultCacheManager(org.infinispan.manager.DefaultCacheManager) FastLocalCacheProviderFactory(org.commonjava.maven.galley.cache.infinispan.FastLocalCacheProviderFactory) ConcreteResource(org.commonjava.maven.galley.model.ConcreteResource) File(java.io.File) SimpleCacheInstance(org.commonjava.maven.galley.cache.infinispan.SimpleCacheInstance) Before(org.junit.Before)

Aggregations

File (java.io.File)1 FastLocalCacheProviderFactory (org.commonjava.maven.galley.cache.infinispan.FastLocalCacheProviderFactory)1 SimpleCacheInstance (org.commonjava.maven.galley.cache.infinispan.SimpleCacheInstance)1 PartyLineCacheProviderFactory (org.commonjava.maven.galley.cache.partyline.PartyLineCacheProviderFactory)1 ConcreteResource (org.commonjava.maven.galley.model.ConcreteResource)1 DefaultCacheManager (org.infinispan.manager.DefaultCacheManager)1 Before (org.junit.Before)1