java - 乐观锁和悲观锁的概念是否仅限于关系型数据库?
天蓬老师
天蓬老师 2017-04-17 13:06:39
0
3
696

维基百科上,对于乐观锁和悲观锁的定义是限定在关系型数据库上的。
但是在语言层面上,比如java,是否有这样的概念?实现都有什么呢?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(3)
洪涛

The concept of "lock" is not limited to a specific language implementation. He feels that it is more appropriate to accompany the multi-threading model.
The shadow of locks will be seen wherever critical resource access is involved. Optimistic locking and pessimistic locking are just two more detailed models of locks. The mysql database is implemented in C language. It also involves multiple threads accessing a data at the same time, two people writing at the same time, one person writing and one reading, two people reading at the same time, etc. So locks are not limited to relational databases.

大家讲道理

Concurrent reading and writing of any resource can have "locks".

大家讲道理

I’m not sure whether Java multi-threading locks exist

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template