use of org.commonjava.maven.galley.cache.infinispan.GridFileSystemCacheProvider in project indy by Commonjava.
the class InfinispanGalleyStorageProvider method setup.
@PostConstruct
public void setup() {
SpecialPathInfo infoSpi = SpecialPathInfo.from(new FilePatternMatcher(".+\\.info")).setDecoratable(false).setDeletable(false).setListable(false).setPublishable(false).setRetrievable(false).setStorable(false).build();
specialPathManager.registerSpecialPathInfo(infoSpi);
transferDecorator = new ChecksummingTransferDecorator(Collections.singleton(TransferOperation.GENERATE), specialPathManager, new Md5GeneratorFactory(), new Sha1GeneratorFactory());
this.cacheProvider = new GridFileSystemCacheProvider(pathGenerator, fileEventManager, transferDecorator, cacheFs);
}
use of org.commonjava.maven.galley.cache.infinispan.GridFileSystemCacheProvider 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);
}
Aggregations