毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 英语论文 >> 正文

java论文外文文献及译文 第2页

更新时间:2010-10-27:  来源:毕业论文
java论文外文文献及译文 第2页
Hibernate provides two Cache, first-level cache is a Session-level cache, which cache belongs to the scope of services. This level of cache by the hibernate managed without the need for intervention under normal circumstances; second-level cache is SessionFactory-level cache, it belongs to the process of range or scope of the cache cluster. This level of cache can be configured and changed, and can be dynamically loaded and unloaded. Hibernate query results also provide a query cache, it depends on the second level cache.
When an application called Session's save (), update (), saveOrUpdate (), get () or load (), and the query interface call list (), iterate () or filter () method, if the Session cache does not exist a corresponding object, Hibernate will put the object to the first level cache. When cleaning the cache, Hibernate objects according to the state of the cache changes to synchronize update the database. Session for the application provides two methods of managing the cache: evict (Object obj): removed from the cache parameters of the specified persistent object. clear (): Empty the cache of all persistent objects.
Hibernate second-level cache strategy general process is as follows:
1) The condition when a query is always issued a select * from table_name where .... (Select all fields) such as SQL statement to query the database, an access to all of the data object.
2) all the data objects to be placed under the ID to the second level cache.
3) When the Hibernate object-based ID to access the data, the first check from the Session a cache; finding out, if the configuration of the secondary cache, then the secondary cache from the investigation; finding out, and then query the database, the results in accordance with the ID into the cache.
4) remove, update and increase the time data, while updating the cache.
Hibernate second-辣-文^论'文.网http://www.751com.cn against the conditions of the Query Cache.
Hibernate object-relational mapping for the delay and non-delay object initialization. Non-lazy when reading an object and the object will be all read out together with other objects. This sometimes results in hundreds (if not thousands of words) select statement when reading the object implementation. This problem sometimes occurs when using the two-way relationship, often leading to the databases to be read during the initialization phase out. Of course, you can take the trouble to examine each object and other objects of Guanxi, and to the most expensive of the Shan Chu, but in the last, we may therefore lose Le ORM tool this Xiangzai obtained Bian Li.
A cache and secondary cache of comparison: the first level cache second level cache data stored in the form of interrelated persistent objects the object of bulk data cache range of the scope of services, each transaction has a separate first-level cache process range or scope of the cluster, the cache is the same process or cluster to share on all matters within the concurrent access policies because each transaction has a separate first-level cache, concurrency problem does not occur without the need to provide concurrent access policy will be a number of matters simultaneous access to the same second-level cache data, it is necessary to provide appropriate concurrent access policies, to ensure that a particular transaction isolation level data expiration policies did not provide data expiration policies. Object in a cache will never expire, unless the application explicitly clear the cache or clear a specific object must provide data expiration policies, such as memory cache based on the maximum number of objects, allowing objects in the cache of the most a long time, and allowing the object in the cache the longest idle time of physical memory and hard disk memory storage medium. First of all bulk data objects stored in the memory-based cache, when the number of objects in memory to data expiration policy specified limit, the remaining objects will be written on the hard disk cache. Caching software implementation of the Hibernate Session is included in the realization of the cache provided by third parties, Hibernate provides only a cache adapter (CacheProvider). Used to plug into a particular cache in Hibernate. Way cache enabled applications by as long as the Session interface implementation save, update, delete, data loading and query the database operations, Hibernate will enable first-level cache, the data in the database in the form of an object copied to the cache For batch updates and bulk delete operations, if you do not want to enable first-level cache, you can bypass the Hibernate API, JDBC API directly to perform that operation. Users can type in a single class or a single set of second-level cache size on the configuration. If the instance of the class are frequently read but rarely modified, you can consider using a second-level cache. Only for a class or set of second-level cache is configured, Hibernate will run when an instance of it to the second-level cache. User management means the first level cache of physical media for the memory cache, because the memory capacity is limited, must pass the appropriate search strategies and retrieval methods to limit the number of objects loaded. Session of the evit () method can explicitly clear the cache a

上一页  [1] [2] [3] [4] [5] [6] [7] 下一页

java论文外文文献及译文 第2页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。