use of org.commonjava.maven.galley.cache.partyline.PartyLineCacheProvider in project galley by Commonjava.
the class FastLocalCacheProviderFactory method create.
@Override
public synchronized CacheProvider create(PathGenerator pathGenerator, TransferDecorator transferDecorator, FileEventManager fileEventManager) throws GalleyInitException {
if (provider == null) {
PartyLineCacheProvider pl = new PartyLineCacheProvider(cacheDir, pathGenerator, fileEventManager, transferDecorator);
provider = new FastLocalCacheProvider(pl, nfsUsageCache, pathGenerator, fileEventManager, transferDecorator, executor, nfsDir.getPath());
}
return provider;
}
use of org.commonjava.maven.galley.cache.partyline.PartyLineCacheProvider in project galley by Commonjava.
the class FastLocalCacheProviderTest method testConstructorWitNFSSysPath.
@Test
public void testConstructorWitNFSSysPath() throws IOException {
System.setProperty(FastLocalCacheProvider.NFS_BASE_DIR_KEY, temp.newFolder().getCanonicalPath());
new FastLocalCacheProvider(new PartyLineCacheProvider(temp.newFolder(), pathgen, events, decorator), new SimpleCacheInstance<>("test", cache), pathgen, events, decorator, executor, null);
}
use of org.commonjava.maven.galley.cache.partyline.PartyLineCacheProvider in project galley by Commonjava.
the class FastLocalCacheProviderTest method testConstructorWitNoNFSSysPath.
@Test(expected = java.lang.IllegalArgumentException.class)
public void testConstructorWitNoNFSSysPath() throws IOException {
Properties props = System.getProperties();
props.remove(FastLocalCacheProvider.NFS_BASE_DIR_KEY);
System.setProperties(props);
final String NON_EXISTS_PATH = "";
new FastLocalCacheProvider(new PartyLineCacheProvider(temp.newFolder(), pathgen, events, decorator), new SimpleCacheInstance<>("test", cache), pathgen, events, decorator, executor, NON_EXISTS_PATH);
}
use of org.commonjava.maven.galley.cache.partyline.PartyLineCacheProvider in project galley by Commonjava.
the class TestCDIProvider method start.
@PostConstruct
public void start() {
try {
temp.create();
cacheProvider = new PartyLineCacheProvider(temp.newFolder(), pathGenerator, eventManager, transferDecorator);
fileTransportConfig = new FileTransportConfig(temp.newFolder(), pathGenerator);
} catch (IOException e) {
Assert.fail("Failed to init temp folder fro file cache.");
}
locationExpander = new NoOpLocationExpander();
locationResolver = new SimpleUrlLocationResolver(locationExpander, transportManager);
globalHttpConfiguration = new GlobalHttpConfiguration();
weftConfig = new DefaultWeftConfig();
}
use of org.commonjava.maven.galley.cache.partyline.PartyLineCacheProvider in project galley by Commonjava.
the class FastLocalCacheProviderConcurrentTest method setup.
@Before
public void setup() throws Exception {
final String nfsBasePath = createNFSBaseDir(temp.newFolder().getCanonicalPath());
plProvider = new PartyLineCacheProvider(temp.newFolder(), pathgen, events, decorator);
provider = new FastLocalCacheProvider(plProvider, new SimpleCacheInstance<>("test", cache), pathgen, events, decorator, executor, nfsBasePath);
}
Aggregations