Search in sources :

Example 1 with PathGenerator

use of org.commonjava.maven.galley.spi.io.PathGenerator in project galley by Commonjava.

the class PartyLineCacheProviderTest method setup.

@Before
public void setup() throws Exception {
    final PathGenerator pathgen = new HashedLocationPathGenerator();
    final FileEventManager events = new TestFileEventManager();
    final TransferDecorator decorator = new TestTransferDecorator();
    provider = new PartyLineCacheProvider(temp.newFolder(), pathgen, events, decorator);
}
Also used : TestTransferDecorator(org.commonjava.maven.galley.cache.testutil.TestTransferDecorator) TestFileEventManager(org.commonjava.maven.galley.cache.testutil.TestFileEventManager) FileEventManager(org.commonjava.maven.galley.spi.event.FileEventManager) HashedLocationPathGenerator(org.commonjava.maven.galley.io.HashedLocationPathGenerator) HashedLocationPathGenerator(org.commonjava.maven.galley.io.HashedLocationPathGenerator) PathGenerator(org.commonjava.maven.galley.spi.io.PathGenerator) TestFileEventManager(org.commonjava.maven.galley.cache.testutil.TestFileEventManager) TestTransferDecorator(org.commonjava.maven.galley.cache.testutil.TestTransferDecorator) TransferDecorator(org.commonjava.maven.galley.spi.io.TransferDecorator) Before(org.junit.Before)

Example 2 with PathGenerator

use of org.commonjava.maven.galley.spi.io.PathGenerator in project galley by Commonjava.

the class GridFileSystemCacheProviderTest method setup.

@Before
public void setup() throws Exception {
    final PathGenerator pathgen = new HashedLocationPathGenerator();
    final FileEventManager events = new TestFileEventManager();
    final TransferDecorator decorator = new TestTransferDecorator();
    Cache<String, byte[]> data = CACHE_MANAGER.getCache(name.getMethodName() + "-data");
    Cache<String, GridFile.Metadata> metadata = CACHE_MANAGER.getCache(name.getMethodName() + "-metadata");
    final GridFilesystem fs = new GridFilesystem(data, metadata);
    provider = new GridFileSystemCacheProvider(pathgen, events, decorator, fs);
}
Also used : TestTransferDecorator(org.commonjava.maven.galley.cache.testutil.TestTransferDecorator) GridFileSystemCacheProvider(org.commonjava.maven.galley.cache.infinispan.GridFileSystemCacheProvider) TestFileEventManager(org.commonjava.maven.galley.cache.testutil.TestFileEventManager) FileEventManager(org.commonjava.maven.galley.spi.event.FileEventManager) GridFilesystem(org.infinispan.io.GridFilesystem) HashedLocationPathGenerator(org.commonjava.maven.galley.io.HashedLocationPathGenerator) HashedLocationPathGenerator(org.commonjava.maven.galley.io.HashedLocationPathGenerator) PathGenerator(org.commonjava.maven.galley.spi.io.PathGenerator) TestFileEventManager(org.commonjava.maven.galley.cache.testutil.TestFileEventManager) TestTransferDecorator(org.commonjava.maven.galley.cache.testutil.TestTransferDecorator) TransferDecorator(org.commonjava.maven.galley.spi.io.TransferDecorator) Before(org.junit.Before)

Aggregations

TestFileEventManager (org.commonjava.maven.galley.cache.testutil.TestFileEventManager)2 TestTransferDecorator (org.commonjava.maven.galley.cache.testutil.TestTransferDecorator)2 HashedLocationPathGenerator (org.commonjava.maven.galley.io.HashedLocationPathGenerator)2 FileEventManager (org.commonjava.maven.galley.spi.event.FileEventManager)2 PathGenerator (org.commonjava.maven.galley.spi.io.PathGenerator)2 TransferDecorator (org.commonjava.maven.galley.spi.io.TransferDecorator)2 Before (org.junit.Before)2 GridFileSystemCacheProvider (org.commonjava.maven.galley.cache.infinispan.GridFileSystemCacheProvider)1 GridFilesystem (org.infinispan.io.GridFilesystem)1