本文整理了Java中org.neo4j.io.fs.FileUtils.highIODevice()
方法的一些代码示例,展示了FileUtils.highIODevice()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.highIODevice()
方法的具体详情如下:
包路径:org.neo4j.io.fs.FileUtils
类名称:FileUtils
方法名:highIODevice
[英]Attempts to discern if the given path is mounted on a device that can likely sustain a very high IO throughput.
A high IO device is expected to have negligible seek time, if any, and be able to service multiple IO requests in parallel.
[中]尝试识别给定路径是否安装在可能维持非常高IO吞吐量的设备上。
高IO设备的寻道时间可以忽略不计(如果有的话),并且能够并行处理多个IO请求。
代码示例来源:origin: neo4j/neo4j
@Override
public boolean highIO()
{
return defaultHighIO != null ? defaultHighIO : FileUtils.highIODevice( storeDir.toPath(), false );
}
代码示例来源:origin: neo4j/neo4j
@Override
public boolean highIO()
{
return FileUtils.highIODevice( sourceDirectoryStructure.databaseDirectory().toPath(), super.highIO() );
}
};
代码示例来源:origin: neo4j/neo4j
@Test
public void onLinuxDevShmHasHighIO()
{
assumeTrue( SystemUtils.IS_OS_LINUX );
assertTrue( FileUtils.highIODevice( Paths.get( "/dev/shm" ), false ) );
}
代码示例来源:origin: neo4j/neo4j
@Test
public void windowsNeverHaveHighIO()
{
// Future work: Maybe we should do like on Mac and assume true on Windows as well?
assumeTrue( SystemUtils.IS_OS_WINDOWS );
assertFalse( FileUtils.highIODevice( Paths.get( "." ), false ) );
}
代码示例来源:origin: neo4j/neo4j
@Test
public void allMacsHaveHighIO()
{
assumeTrue( SystemUtils.IS_OS_MAC );
assertTrue( FileUtils.highIODevice( Paths.get( "." ), false ) );
}
代码示例来源:origin: org.neo4j/neo4j-import-tool
@Override
public boolean highIO()
{
return defaultHighIO != null ? defaultHighIO : FileUtils.highIODevice( storeDir.toPath(), false );
}
代码示例来源:origin: org.neo4j/neo4j-kernel
@Override
public boolean highIO()
{
return FileUtils.highIODevice( sourceDirectoryStructure.databaseDirectory().toPath(), super.highIO() );
}
};
代码示例来源:origin: org.neo4j/neo4j-enterprise-kernel
PageLoader getLoader( PagedFile file ) throws IOException
{
if ( FileUtils.highIODevice( file.file().toPath(), false ) )
{
return new ParallelPageLoader( file, executor, pageCache );
}
return new SingleCursorPageLoader( file );
}
}
内容来源于网络,如有侵权,请联系作者删除!