Figure 2 shows the idea behind optimistic locking.
图2展示了乐观锁定背后的思想。
First, enable optimistic locking in the deployment descriptor.
首先,在部署描述符中启用乐观锁定。
Read-Committed is the minimum level required for optimistic locking to work.
Read-Committed是乐观锁工作所需的最低级别。
However, the schema of the table also affects the behavior of optimistic locking.
然而,表模式也会影响乐观锁定的行为。
DB2 9.5 adds support for easier and faster optimistic locking with no false positives.
DB2 V9.5支持进行更简便和快捷的乐观锁定,而且避免了误判的发生。
While not enforced, optimistic locking is highly recommended in flow-managed persistence.
尽管不是强制实施的,但是强烈建议在流管理的持久化中使用乐观锁。
The solution for this unnecessary SQL problem is to use an "optimistic locking" technique.
解决这一不必要SQL问题的方法是,采用 “乐观锁定(optimistic locking)”技术。
Applications using this programming model will benefit from the enhanced optimistic locking feature.
使用这种编程模型的应用程序将从增强的乐观锁定特性中获益。
Due to the obvious concurrency requirement, you would first enable optimistic locking on entity classes.
由于明显的并发性需求,您应该首先在实体类上启用乐观锁。
Note that without DDL changes, optimistic locking applications may get more false negatives than with DDL changes.
注意,在不进行DDL修改的情况下,乐观锁定应用程序可能会产生更多的漏判(falsenegative)。
We add an extra integer column to the table for which optimistic locking is required; this holds a revision counter.
向要使用乐观锁定的表中添加一个额外的整数列;该列保存修订计数器。
However, you can iterate through a set of rows and update each row individually while using optimistic locking techniques.
不过,您可以使用乐观锁定技术循环访问一组行并单独更新每个数据行。
Applications using this programming model benefit from the enhanced optimistic locking feature and gain improved concurrency.
使用这种编程模型的应用程序可以从增强的乐观锁定特性受益,并且能够进一步增强并发性。
The other approach used by SCM vendors is optimistic locking, which allows concurrent changes to an artifact by multiple developers.
SCM提供商所使用的其他方法是optimistic locking,这将使得多个开发人员能够对同一个构件进行并发的改动。
It has much better integrity than optimistic locking but requires you to be careful with your application design to avoid Deadlocks.
它拥有比乐观锁更好的完整性,但是需要你小心设计应用程序以避免死锁。
The next statement tells Grails that the table does not have a version column. (GORM normally creates one to help facilitate optimistic locking.)
下一条语句通知Grails表没有version列(GORM通常会创建一个 version列来优化乐观锁定)。
A collection of SDOs that has been altered also maintains a record of its original values, enabling certain sorts of optimistic locking algorithms.
一组经过变更的SDO还会维护一条其原始值的记录,从而支持某种类型的乐观性锁定算法。
Instead, we recommend the use of an optimistic locking strategy, delegating responsibility for concurrency control to appropriate application logic.
我们建议采用乐观锁定策略,将并发控制的责任委派给相应的应用程序逻辑。
Note that applications that do not use this programming model are not considered optimistic locking applications, and they will continue to work as before.
注意,未使用这种编程模型的应用程序被认为是非乐观锁定应用程序,它们将按照以前的方式工作。
A way to avoid this is to follow an optimistic locking strategy and assume that it is very unlikely that another user will try to change the same row that you are changing.
避免发生这种情况的方法就是使用乐观锁定策略,即假设在修改某行时,另一个用户试图对这一行进行修改的可能性极低。
As physical database locks are held for a longer time duration than with an optimistic locking strategy, there is more of a chance for performance and throughput being impacted.
同乐观锁定策略相比,物理数据库锁需要持续较长的时间,因此应用程序性能和吞吐量很可能会受到影响。
Since the new SQL expressions and attributes for optimistic locking can be used with no DDL changes to the tables involved, you can easily try optimistic locking in your test applications.
由于不需要对表进行DDL修改即可使用针对乐观锁定的新SQL表达式和属性,因此可以轻松地在您的测试应用程序中尝试乐观锁定特性。
On the other hand, if the database is the system of record, then you could use either optimistic locking or ObjectGrid’s built-in SCN support to detect and handle stale data in the cache.
另一方面,如果数据库是记录系统,那么您可以使用开放式锁定或ObjectGrid的内置SCN支持来检测和处理缓存中的过时数据。
Optimistic locking restrictions and considerations.
乐观锁定特性的局限性和注意事项。
Optimistic locking in DB2 9.5 improves scalability by minimizing the time for which a given resource is unavailable for use by other transactions.
DB2 V9.5 的乐观锁定特性最小化了给定资源对于其他事务的不可用时间,进一步改善了可伸缩性。
Optimistic locking is an extremely efficient concurrency control method that guarantees data integrity without placing any physical lock in the database.
乐观锁是一个极其有效的并发性控制方法,它可以确保数据完整性而又无需在数据库中放置任何物理锁。
Optimistic Locking is a strategy where you read a record, take note of a version number and check that the version hasn't changed before you write the record back.
乐观锁是这样一种策略,你可以读取记录,记录版本号并检查,在你写回之前该版本没有改变。
Optimistic locking will not work if Hibernate is not the sole database user, unless you create database triggers to increment the version column for the same data change by other applications.
如果Hibernate不是独占数据库用户,乐观锁会失效,除非创建数据库触发器为其他应用程序对相同数据的变更增加版本字段值。
Optimistic locking will not work if Hibernate is not the sole database user, unless you create database triggers to increment the version column for the same data change by other applications.
如果Hibernate不是独占数据库用户,乐观锁会失效,除非创建数据库触发器为其他应用程序对相同数据的变更增加版本字段值。
应用推荐