use of org.infinispan.io.GridFilesystem in project indy by Commonjava.
the class StorageFileIOTest method setup.
@Before
public void setup() throws IOException {
storageRoot = temp.newFolder("data");
Properties storageProps = new Properties();
storageProps.setProperty(StorageFileIO.STORAGE_ROOT_DIR, storageRoot.getAbsolutePath());
Configuration dataConfig = new ConfigurationBuilder().persistence().passivation(true).addStore(CustomStoreConfigurationBuilder.class).customStoreClass(StorageFileIO.class).properties(storageProps).build();
String dataName = name.getMethodName() + "-data";
CACHE_MANAGER.defineConfiguration(dataName, dataConfig);
Configuration mdConfig = new ConfigurationBuilder().build();
String metadataName = name.getMethodName() + "-metadata";
CACHE_MANAGER.defineConfiguration(metadataName, mdConfig);
dataCache = CACHE_MANAGER.getCache(dataName);
fs = new GridFilesystem(dataCache, CACHE_MANAGER.getCache(metadataName));
}
use of org.infinispan.io.GridFilesystem 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