org.apache.ignite.Ignite.fileSystems()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(153)

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

Ignite.fileSystems介绍

[英]Gets all instances of IGFS (Ignite In-Memory File System).
[中]获取IGFS(Ignite-In-Memory文件系统)的所有实例。

代码示例

代码示例来源:origin: apache/ignite

/** {@inheritDoc} */
@Override public Collection<IgniteFileSystem> fileSystems() {
  checkIgnite();
  return g.fileSystems();
}

代码示例来源:origin: apache/ignite

/** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
  Ignite ignite = startGrid(1);
  igfs = (IgfsImpl) ignite.fileSystems().iterator().next();
}

代码示例来源:origin: apache/ignite

/**
 * Creates instance of the HadoopIgfsInProcWithIgniteRefsCount by IGFS name.
 *
 * @param ignite Ignite instance.
 * @param igfsName Target IGFS name.
 * @param log Log.
 * @param userName User name.
 * @return HadoopIgfsInProcWithIgniteRefsCount instance. {@code null} if the IGFS not found
 *      in the specified ignite instance.
 */
private static HadoopIgfsInProc create0(Ignite ignite, String igfsName, Log log, String userName) {
  assert Thread.holdsLock(REF_CTR_MUX);
  assert ignite != null;
  if (Ignition.state(ignite.name()) == STARTED) {
    try {
      for (IgniteFileSystem fs : ignite.fileSystems()) {
        if (F.eq(fs.name(), igfsName)) {
          Integer ctr = REF_CTRS.get(ignite.name());
          if (ctr != null)
            REF_CTRS.put(ignite.name(), ctr + 1);
          return new HadoopIgfsInProc((IgfsEx)fs, log, userName);
        }
      }
    }
    catch (IllegalStateException ignore) {
      // May happen if the grid state has changed:
    }
  }
  return null;
}

代码示例来源:origin: org.apache.ignite/ignite-spring

/** {@inheritDoc} */
@Override public Collection<IgniteFileSystem> fileSystems() {
  checkIgnite();
  return g.fileSystems();
}

相关文章