标签:not jvm multi for 进程间 基于 常见 hal 读写
常见模型是BitCask
并发下的数据库文件读写:
本来想使用FileLock,但是后来发现 FileLock是进程间的,并不能用于同一个JVM多个线程之间的同步:
File locks are held on behalf of the entire Java virtual machine.
* They are not suitable for controlling access to a file by multiple
* threads within the same virtual machine.
标签:not jvm multi for 进程间 基于 常见 hal 读写
原文地址:https://www.cnblogs.com/shawshawwan/p/9757468.html