org.locationtech.geogig.repository.Hints.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(93)

本文整理了Java中org.locationtech.geogig.repository.Hints.<init>()方法的一些代码示例,展示了Hints.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hints.<init>()方法的具体详情如下:
包路径:org.locationtech.geogig.repository.Hints
类名称:Hints
方法名:<init>

Hints.<init>介绍

暂无

代码示例

代码示例来源:origin: org.locationtech.geogig/geogig-api

/**
 * @return a new {@code Hints} object with the hints for a read only repository
 */
public static Hints readOnly() {
  Hints hints = new Hints();
  hints.set(Hints.OBJECTS_READ_ONLY, Boolean.TRUE);
  hints.set(Hints.REMOTES_READ_ONLY, Boolean.TRUE);
  return hints;
}

代码示例来源:origin: org.locationtech.geogig/geogig-web-api

public static Hints createHintsFromParameters(final String repositoryName,
      final Map<String, String> parameters) throws UnsupportedEncodingException,
      URISyntaxException, IOException, RepositoryConnectionException {
    final Hints hints = new Hints();
    hints.set(Hints.REPOSITORY_NAME, repositoryName);
    // try to build the Repo URI from any Request parameters.
    INSTANCE.updateHintsWithParams(hints, parameters);
    return hints;
  }
}

代码示例来源:origin: locationtech/geogig

/**
 * @return a new {@code Hints} object with the hints for a repository with read/write access
 */
public static Hints readWrite() {
  Hints hints = new Hints();
  hints.set(Hints.OBJECTS_READ_ONLY, Boolean.FALSE);
  hints.set(Hints.REMOTES_READ_ONLY, Boolean.FALSE);
  return hints;
}

代码示例来源:origin: org.locationtech.geogig/geogig-core

@Override
public ConfigDatabase getConfigDatabase(URI repoURI, Context repoContext, boolean rootUri) {
  Hints hints = new Hints().uri(repoURI);
  Platform platform = repoContext.platform();
  return new IniFileConfigDatabase(platform, hints, rootUri);
}

代码示例来源:origin: org.locationtech.geogig/geogig-postgres

@Override
public Repository open(URI repositoryLocation) throws RepositoryConnectionException {
  Preconditions.checkArgument(canHandle(repositoryLocation), "Not a PostgreSQL URI: %s",
      repositoryLocation);
  Hints hints = new Hints();
  hints.set(Hints.REPOSITORY_URL, repositoryLocation.toString());
  Context context = GlobalContextBuilder.builder().build(hints);
  Repository repository = new GeoGIG(context).getRepository();
  repository.open();
  return repository;
}

代码示例来源:origin: org.locationtech.geogig/geogig-bdbje

@Override
protected GraphDatabase createDatabase(TestPlatform platform) {
  File root = platform.pwd();
  Preconditions.checkState(new File(root, ".geogig").exists());
  envProvider = new EnvironmentBuilder(platform, null);
  ConfigDatabase configDB = new IniFileConfigDatabase(platform);
  return new JEGraphDatabase_v0_1(configDB, envProvider, new Hints());
}

代码示例来源:origin: org.locationtech.geogig/geogig-bdbje

@Override
  protected GraphDatabase createDatabase(Platform platform) throws Exception {
    File root = platform.pwd();
    Preconditions.checkState(new File(root, ".geogig").exists());

    envProvider = new EnvironmentBuilder(platform, null);

    ConfigDatabase configDB = new IniFileConfigDatabase(platform);
    return new JEGraphDatabase_v0_2(configDB, envProvider, new Hints());
  }
}

代码示例来源:origin: locationtech/geogig

protected @Override RocksdbObjectStore createOpen() {
    Hints hints = new Hints();
    RocksdbObjectStore database = new RocksdbObjectStore(platform, hints);
    database.open();
    return database;
  }
}

代码示例来源:origin: org.locationtech.geogig/geogig-core

protected Context createInjector() {
  Platform platform = createPlatform();
  URI uri = repositoryDirectory.getAbsoluteFile().toURI();
  Hints hints = new Hints().uri(uri).platform(platform);
  return new TestContextBuilder().build(hints);
}

代码示例来源:origin: locationtech/geogig

static Context createContext(File repositoryDirectory) {
  Platform platform = new TestPlatform(repositoryDirectory);
  URI uri = repositoryDirectory.getAbsoluteFile().toURI();
  Hints hints = new Hints().uri(uri).platform(platform);
  return Guice.createInjector(Modules.override(new GeogigModule())
      .with(new HintsModule(hints), new RocksStorageModule())).getInstance(Context.class);
}

代码示例来源:origin: org.locationtech.geogig/geogig-bdbje

@Override
  protected Context createInjector() {
    Hints hints = new Hints().uri(repositoryDirectory.toURI()).platform(createPlatform());
    return new JETestContextBuilder().build(hints);
  }
}

代码示例来源:origin: org.locationtech.geogig/geogig-bdbje

@Override
protected Context createInjector() {
  Hints hints = new Hints().uri(repositoryDirectory.toURI()).platform(createPlatform());
  return new JETestContextBuilder().build(hints);
}

代码示例来源:origin: locationtech/geogig

@Override
  protected Context createInjector() {

    String repoUrl = testConfig.getRepoURL();

    Hints hints = new Hints();
    hints.set(Hints.REPOSITORY_URL, repoUrl);
    return Guice.createInjector(Modules.override(new GeogigModule())
        .with(new HintsModule(hints), new PGStorageModule())).getInstance(Context.class);
  }
}

代码示例来源:origin: locationtech/geogig

@Override
  protected Context createInjector() {

    String repoUrl = testConfig.getRepoURL();

    Hints hints = new Hints();
    hints.set(Hints.REPOSITORY_URL, repoUrl);
    return Guice.createInjector(Modules.override(new GeogigModule())
        .with(new HintsModule(hints), new PGStorageModule())).getInstance(Context.class);
  }
}

代码示例来源:origin: locationtech/geogig

@Override
  protected Context createInjector() {

    String repoUrl = testConfig.getRepoURL();

    Hints hints = new Hints();
    hints.set(Hints.REPOSITORY_URL, repoUrl);
    Context context = Guice.createInjector(Modules.override(new GeogigModule())
        .with(new HintsModule(hints), new PGStorageModule())).getInstance(Context.class);
    return context;
  }
}

代码示例来源:origin: locationtech/geogig

@Override
protected HeapObjectDatabase createOpen(boolean readOnly) {
  Platform platform = new DefaultPlatform();
  Hints hints = new Hints();
  hints.set(Hints.OBJECTS_READ_ONLY, readOnly);
  HeapObjectDatabase store = new HeapObjectDatabase(platform, hints);
  store.open();
  return store;
}

代码示例来源:origin: locationtech/geogig

@Override
protected Context createInjector() {
  Platform platform = createPlatform();
  GlobalContextBuilder.builder(new TestContextBuilder(platform));
  URI uri = repositoryDirectory.getAbsoluteFile().toURI();
  Hints hints = new Hints().uri(uri).platform(platform);
  return GlobalContextBuilder.builder().build(hints);
}

代码示例来源:origin: org.locationtech.geogig/geogig-rocksdb

@Override
protected RocksdbObjectDatabase createOpen(boolean readOnly) {
  Hints hints = new Hints();
  hints.set(Hints.OBJECTS_READ_ONLY, readOnly);
  configdb = new HeapConfigDatabase();
  RocksdbObjectDatabase database = new RocksdbObjectDatabase(platform, hints, configdb);
  database.open();
  return database;
}

代码示例来源:origin: org.locationtech.geogig/geogig-datastore

@Override
protected Context createInjector() {
  Platform platform = createPlatform();
  GlobalContextBuilder.builder(new TestContextBuilder(platform));
  URI uri = repositoryDirectory.getAbsoluteFile().toURI();
  Hints hints = new Hints().uri(uri).platform(platform);
  return GlobalContextBuilder.builder().build(hints);
}

代码示例来源:origin: org.locationtech.geogig/geogig-rocksdb

@Before
public void setUp() throws IOException {
  File root = folder.getRoot();
  folder.newFolder(".geogig");
  File home = folder.newFolder("home");
  platform = new TestPlatform(root);
  platform.setUserHome(home);
  hints = new Hints();
  configDB = new IniFileConfigDatabase(platform);
  db = new RocksdbObjectDatabase(platform, hints, configDB);
  db.open();
}

相关文章