乐观锁:当消费者需要读取BO实例数据时,消费者通常需要当前最新状态的数据。只是简单地将buffer里的数据返回并不能满足该读取请求,因为当前待读取的BO数据可能在一个并行session里已经被其他消费者修改了。当事务终结时,乐观锁被释放,排他锁被转换成乐观锁。
‘X’ means that the lock entry was set in ‘shared mode’ and can therefore accept further lock entries by other users also in ‘shared mode’.
X 意味着锁记录在shared mode下被设置,因此接受其他用户再次使用shared mode给当前BO上锁。
There are different ways to synchronize access by several users:
排他锁
Exclusive lock (E): The locked data can be displayed or edited by one user only.
被锁住的数据只能被单一的用户显示或者编辑。
某个BO已经存在排他锁的前提下,不允许其他用户再申请新的排他锁或者共享锁。
共享锁
Shared Lock (S): Several users can access the locked data at the same time in display mode.
多个用户能同时在display mode下显示具有共享锁的数据。持有共享锁的BO数据,可以再接受新的共享锁请求。但无法再申请排他锁。