use of org.locationtech.geogig.storage.fs.IniFileConfigDatabase in project GeoGig by boundlessgeo.
the class JEObjectDatabaseTest method createDb.
private ObjectDatabase createDb() {
ConfigDatabase configDB = new IniFileConfigDatabase(platform);
JEObjectDatabase db = new JEObjectDatabase_v0_1(configDB, envProvider, hints);
db.open();
return db;
}
use of org.locationtech.geogig.storage.fs.IniFileConfigDatabase in project GeoGig by boundlessgeo.
the class JEGraphDatabaseV1StressTest method createDatabase.
@Override
protected GraphDatabase createDatabase(TestPlatform platform) {
File root = platform.pwd();
Preconditions.checkState(new File(root, ".geogig").exists());
envProvider = new EnvironmentBuilder(platform);
ConfigDatabase configDB = new IniFileConfigDatabase(platform);
return new JEGraphDatabase_v0_1(configDB, envProvider, new Hints());
}
use of org.locationtech.geogig.storage.fs.IniFileConfigDatabase in project GeoGig by boundlessgeo.
the class JEGraphDatabaseV1Test method createDatabase.
@Override
protected GraphDatabase createDatabase(Platform platform) throws Exception {
File root = platform.pwd();
Preconditions.checkState(new File(root, ".geogig").exists());
envProvider = new EnvironmentBuilder(platform);
ConfigDatabase configDB = new IniFileConfigDatabase(platform);
return new JEGraphDatabase_v0_1(configDB, envProvider, new Hints());
}
use of org.locationtech.geogig.storage.fs.IniFileConfigDatabase in project GeoGig by boundlessgeo.
the class JEGraphDatabaseV2StressTest method createDatabase.
@Override
protected GraphDatabase createDatabase(TestPlatform platform) {
File root = platform.pwd();
Preconditions.checkState(new File(root, ".geogig").exists());
envProvider = new EnvironmentBuilder(platform);
ConfigDatabase configDB = new IniFileConfigDatabase(platform);
return new JEGraphDatabase_v0_1(configDB, envProvider, new Hints());
}
use of org.locationtech.geogig.storage.fs.IniFileConfigDatabase in project GeoGig by boundlessgeo.
the class CachingModuleTest method setUp.
@Before
public void setUp() throws Exception {
odbCache = mock(Cache.class);
indexCache = mock(Cache.class);
final ObjectDatabaseCacheFactory odbCacheFac = mock(ObjectDatabaseCacheFactory.class);
when(odbCacheFac.get()).thenReturn(odbCache);
final StagingDatabaseCacheFactory indexCacheFac = mock(StagingDatabaseCacheFactory.class);
when(indexCacheFac.get()).thenReturn(indexCache);
File workingDirectory = tmpFolder.getRoot();
final Platform platform = new TestPlatform(workingDirectory);
Module module = new AbstractModule() {
@Override
protected void configure() {
bind(Context.class).to(GuiceInjector.class).in(Scopes.SINGLETON);
Multibinder.newSetBinder(binder(), Decorator.class);
bind(DecoratorProvider.class).in(Scopes.SINGLETON);
DataStreamSerializationFactoryV1 sfac = DataStreamSerializationFactoryV1.INSTANCE;
bind(ObjectSerializingFactory.class).toInstance(sfac);
bind(ObjectDatabase.class).to(HeapObjectDatabse.class).in(Scopes.SINGLETON);
bind(StagingDatabase.class).to(HeapStagingDatabase.class).in(Scopes.SINGLETON);
ConfigDatabase config = new IniFileConfigDatabase(platform);
bind(ConfigDatabase.class).toInstance(config);
bind(ObjectDatabaseCacheFactory.class).toInstance(odbCacheFac);
bind(StagingDatabaseCacheFactory.class).toInstance(indexCacheFac);
}
};
Context injector = Guice.createInjector(Modules.override(new CachingModule()).with(module)).getInstance(org.locationtech.geogig.api.Context.class);
odb = injector.objectDatabase();
index = injector.stagingDatabase();
odb.open();
index.open();
odb.put(o1);
odb.put(o2);
odb.put(o3);
index.put(s1);
index.put(s2);
index.put(s3);
}
Aggregations