本文整理了Java中org.locationtech.geogig.repository.Hints.getBoolean()
方法的一些代码示例,展示了Hints.getBoolean()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hints.getBoolean()
方法的具体详情如下:
包路径:org.locationtech.geogig.repository.Hints
类名称:Hints
方法名:getBoolean
[英]Retrieves a true/false representation of the hint with the given key.
[中]检索具有给定键的提示的真/假表示形式。
代码示例来源:origin: org.locationtech.geogig/geogig-bdbje
public Impl(final ConfigDatabase config, final EnvironmentBuilder envProvider,
final TupleBinding<NodeData> binding, final String formatVersion, final Hints hints) {
this.configDb = config;
this.envProvider = envProvider;
this.BINDING = binding;
this.formatVersion = formatVersion;
this.envName = JEGraphDatabase.ENVIRONMENT_NAME;
this.readOnly = hints.getBoolean(Hints.OBJECTS_READ_ONLY);
}
代码示例来源:origin: org.locationtech.geogig/geogig-postgres
private static boolean readOnly(Hints hints) {
return hints == null ? false : hints.getBoolean(Hints.OBJECTS_READ_ONLY);
}
代码示例来源:origin: locationtech/geogig
private static boolean readOnly(Hints hints) {
return hints == null ? false : hints.getBoolean(Hints.OBJECTS_READ_ONLY);
}
代码示例来源:origin: locationtech/geogig
private static boolean readOnly(Hints hints) {
return hints == null ? false : hints.getBoolean(Hints.OBJECTS_READ_ONLY);
}
代码示例来源:origin: org.locationtech.geogig/geogig-postgres
private static boolean readOnly(Hints hints) {
return hints == null ? false : hints.getBoolean(Hints.OBJECTS_READ_ONLY);
}
代码示例来源:origin: org.locationtech.geogig/geogig-bdbje
@Inject
public JEObjectDatabase_v0_1(final ConfigDatabase configDB,
final EnvironmentBuilder envProvider, final Hints hints) {
this(configDB, envProvider, hints.getBoolean(Hints.OBJECTS_READ_ONLY),
JEObjectDatabase.ENVIRONMENT_NAME);
}
代码示例来源:origin: org.locationtech.geogig/geogig-bdbje
@Inject
public JEObjectDatabase_v0_2(final ConfigDatabase configDB,
final EnvironmentBuilder envProvider, final Hints hints) {
this(configDB, envProvider, hints.getBoolean(Hints.OBJECTS_READ_ONLY),
JEObjectDatabase.ENVIRONMENT_NAME);
}
代码示例来源:origin: locationtech/geogig
private static boolean readOnly(Hints hints) {
return hints == null ? false : hints.getBoolean(Hints.OBJECTS_READ_ONLY);
}
代码示例来源:origin: org.locationtech.geogig/geogig-rocksdb
@Inject
public RocksdbGraphDatabase(Platform platform, Hints hints) {
this.readOnly = hints == null ? false : hints.getBoolean(Hints.OBJECTS_READ_ONLY);
Optional<URI> uri = new ResolveGeogigURI(platform, hints).call();
Preconditions.checkArgument(uri.isPresent(), "not in a geogig directory");
Preconditions.checkArgument("file".equals(uri.get().getScheme()),
"Repository URI is not file://");
File basedir = new File(uri.get());
this.dbdir = new File(basedir, "graph.rocksdb");
}
代码示例来源:origin: locationtech/geogig
public RocksdbObjectStore(Platform platform, @Nullable Hints hints, String databaseName) {
checkNotNull(platform);
this.platform = platform;
this.hints = hints;
Optional<URI> repoUriOpt = new ResolveGeogigURI(platform, hints).call();
checkArgument(repoUriOpt.isPresent(), "couldn't resolve geogig directory");
URI uri = repoUriOpt.get();
checkArgument("file".equals(uri.getScheme()));
this.path = new File(new File(uri), databaseName).getAbsolutePath();
this.readOnly = hints == null ? false : hints.getBoolean(Hints.OBJECTS_READ_ONLY);
}
代码示例来源:origin: locationtech/geogig
private static boolean readOnly(Hints hints) {
return hints == null ? false : hints.getBoolean(Hints.OBJECTS_READ_ONLY);
}
代码示例来源:origin: org.locationtech.geogig/geogig-rocksdb
public RocksdbObjectStore(Platform platform, @Nullable Hints hints, String databaseName) {
checkNotNull(platform);
this.platform = platform;
this.hints = hints;
Optional<URI> repoUriOpt = new ResolveGeogigURI(platform, hints).call();
checkArgument(repoUriOpt.isPresent(), "couldn't resolve geogig directory");
URI uri = repoUriOpt.get();
checkArgument("file".equals(uri.getScheme()));
this.path = new File(new File(uri), databaseName).getAbsolutePath();
this.readOnly = hints == null ? false : hints.getBoolean(Hints.OBJECTS_READ_ONLY);
}
代码示例来源:origin: org.locationtech.geogig/geogig-core
private static boolean readOnly(Hints hints) {
return hints == null ? false : hints.getBoolean(Hints.OBJECTS_READ_ONLY);
}
代码示例来源:origin: org.locationtech.geogig/geogig-core
private static boolean readOnly(Hints hints) {
return hints == null ? false : hints.getBoolean(Hints.OBJECTS_READ_ONLY);
}
代码示例来源:origin: locationtech/geogig
@Inject
public RocksdbGraphDatabase(Platform platform, Hints hints) {
this.readOnly = hints == null ? false : hints.getBoolean(Hints.OBJECTS_READ_ONLY);
Optional<URI> uri = new ResolveGeogigURI(platform, hints).call();
Preconditions.checkArgument(uri.isPresent(), "not in a geogig directory");
Preconditions.checkArgument("file".equals(uri.get().getScheme()),
"Repository URI is not file://");
File basedir = new File(uri.get());
this.dbdir = new File(basedir, "graph.rocksdb");
}
代码示例来源:origin: locationtech/geogig
@Test
public void testReadWrite() {
Hints hints = Hints.readWrite();
assertFalse(hints.getBoolean(Hints.OBJECTS_READ_ONLY));
assertFalse(hints.getBoolean(Hints.REMOTES_READ_ONLY));
}
代码示例来源:origin: locationtech/geogig
@Test
public void testReadOnly() {
Hints hints = Hints.readOnly();
assertTrue(hints.getBoolean(Hints.OBJECTS_READ_ONLY));
assertTrue(hints.getBoolean(Hints.REMOTES_READ_ONLY));
}
代码示例来源:origin: locationtech/geogig
@Test
public void testHints() {
Hints hints = new Hints();
assertTrue(hints.getAll().isEmpty());
assertFalse(hints.get("not present").isPresent());
hints.set("key", "myValue");
assertEquals("myValue", hints.get("key").get());
assertFalse(hints.getBoolean("key"));
hints.set("key2", true);
assertTrue(hints.getBoolean("key2"));
}
内容来源于网络,如有侵权,请联系作者删除!