我在使用 JCIFS SMB 上传 SMB 文件时遇到性能问题。该问题与 jcifs.smb.client.dfs.disabled
属性有关,使用 true
解决了该问题。
现在的问题是,在哪种情况下,我在使用jcifs.smb.client.dfs.disabled=true
时会遇到问题,因为它对我来说必须是静态属性?我有许多不同的环境使用相同的配置。
属性文档 ( link ) 说:
If this property is true, domain based DFS referrals will be disabled. The default value is false. This property can be important in non-domain environments where domain-based DFS referrals that normally run when JCIFS first tries to resolve a path would timeout causing a long startup delay (e.g. running JCIFS only on the local machine without a network like on a laptop).
...但这超出了我的能力范围,无法理解。
此外,如果我可以动态更改它,什么表明我需要这样做?任何特定的异常或场景指出需要 true
或 false
吗?
谢谢!
最佳答案
请阅读this - 什么是DFS。
- 一般来说,您可以将文件夹装载到不同的共享位置。 例如,PC1 有 Share1,PC2 Share2 有一个名为“not located here”的文件夹,它指向 PC1 Share1(只是一个链接)。
解析真实位置SMB使用IOCL查询“get_referrals”,这是DFS的实现。
关于java - SMB jcifs "jcifs.smb.client.dfs.disabled=true"影响,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43386979/