FsExport { public IO ioMode() { return _rw; } private  FsExport(String path, FsExportBuilder builder); static int getExportIndex(String path); String getPath(); @Override String toString(); boolean isAllowed(InetAddress client); boolean isTrusted(); String client(); IO ioMode(); int getIndex(); boolean checkAcls(); Sec getSec(); boolean hasAllSquash(); int getAnonUid(); int getAnonGid(); boolean isWithDcap(); boolean isAllRoot(); boolean isWithPnfs(); boolean isPrivilegedClientPortRequired(); List<layouttype4> getLayoutTypes(); static String normalize(String path); @Override int hashCode(); @Override boolean equals(Object obj); final static int DEFAULT_ANON_UID; final static int DEFAULT_ANON_GID; }
@Test public void testMultipleMatchOrder() throws IOException { Stream<FsExport> exports = _exportFile.exports(InetAddress.getByName("192.168.17.1")); FsExport.IO iomode = exports.findFirst().orElseThrow(AssertionError::new).ioMode(); assertEquals(FsExport.IO.RW, iomode); exports = _exportFile.exports(InetAddress.getByName("192.168.17.2")); iomode = exports.findFirst().orElseThrow(AssertionError::new).ioMode(); assertEquals(FsExport.IO.RO, iomode); }