📄 performance.po
字号:
#: performance.xml:641#, no-c-formatmsgid "yes (replication)"msgstr "yes (replication)"#. Tag: entry#: performance.xml:642#, no-c-formatmsgid "yes (clock sync req.)"msgstr "yes (clock sync req.)"#. Tag: title#: performance.xml:649#, no-c-formatmsgid "Cache mappings"msgstr "Cache mappings"#. Tag: para#: performance.xml:651#, no-c-formatmsgid """The <literal><cache></literal> element of a class or collection ""mapping has the following form:"msgstr """The <literal><cache></literal> element of a class or collection ""mapping has the following form:"#. Tag: programlisting#: performance.xml:662#, no-c-formatmsgid """<![CDATA[<cache \n"" usage=\"transactional|read-write|nonstrict-read-write|read-only\"\n"" region=\"RegionName\"\n"" include=\"all|non-lazy\"\n""/>]]>"msgstr ""#. Tag: para#: performance.xml:665#, no-c-formatmsgid """<literal>usage</literal> (required) specifies the caching strategy: ""<literal>transactional</literal>, <literal>read-write</literal>, ""<literal>nonstrict-read-write</literal> or <literal>read-only</literal>"msgstr """<literal>usage</literal> (required) specifies the caching strategy: ""<literal>transactional</literal>, <literal>read-write</literal>, ""<literal>nonstrict-read-write</literal> or <literal>read-only</literal>"#. Tag: para#: performance.xml:674#, no-c-formatmsgid """<literal>region</literal> (optional, defaults to the class or collection ""role name) specifies the name of the second level cache region"msgstr """<literal>region</literal> (optional, defaults to the class or collection ""role name) specifies the name of the second level cache region"#. Tag: para#: performance.xml:681#, no-c-formatmsgid """<literal>include</literal> (optional, defaults to <literal>all</literal>) ""<literal>non-lazy</literal> specifies that properties of the entity mapped ""with <literal>lazy=\"true\"</literal> may not be cached when attribute-level ""lazy fetching is enabled"msgstr """<literal>include</literal> (optional, defaults to <literal>all</literal>) ""<literal>non-lazy</literal> specifies that properties of the entity mapped ""with <literal>lazy=\"true\"</literal> may not be cached when attribute-level ""lazy fetching is enabled"#. Tag: para#: performance.xml:691#, no-c-formatmsgid """Alternatively (preferrably?), you may specify <literal><class-cache></""literal> and <literal><collection-cache></literal> elements in ""<literal>hibernate.cfg.xml</literal>."msgstr """Alternatively (preferrably?), you may specify <literal><class-cache></""literal> and <literal><collection-cache></literal> elements in ""<literal>hibernate.cfg.xml</literal>."#. Tag: para#: performance.xml:696#, no-c-formatmsgid """The <literal>usage</literal> attribute specifies a <emphasis>cache ""concurrency strategy</emphasis>."msgstr """The <literal>usage</literal> attribute specifies a <emphasis>cache ""concurrency strategy</emphasis>."#. Tag: title#: performance.xml:703#, no-c-formatmsgid "Strategy: read only"msgstr "Strategy: read only"#. Tag: para#: performance.xml:705#, no-c-formatmsgid """If your application needs to read but never modify instances of a persistent ""class, a <literal>read-only</literal> cache may be used. This is the ""simplest and best performing strategy. It's even perfectly safe for use in a ""cluster."msgstr """If your application needs to read but never modify instances of a persistent ""class, a <literal>read-only</literal> cache may be used. This is the ""simplest and best performing strategy. It's even perfectly safe for use in a ""cluster."#. Tag: programlisting#: performance.xml:711#, no-c-formatmsgid """<![CDATA[<class name=\"eg.Immutable\" mutable=\"false\">\n"" <cache usage=\"read-only\"/>\n"" ....\n""</class>]]>"msgstr ""#. Tag: title#: performance.xml:717#, no-c-formatmsgid "Strategy: read/write"msgstr "Strategy: read/write"#. Tag: para#: performance.xml:719#, no-c-formatmsgid """If the application needs to update data, a <literal>read-write</literal> ""cache might be appropriate. This cache strategy should never be used if ""serializable transaction isolation level is required. If the cache is used ""in a JTA environment, you must specify the property <literal>hibernate.""transaction.manager_lookup_class</literal>, naming a strategy for obtaining ""the JTA <literal>TransactionManager</literal>. In other environments, you ""should ensure that the transaction is completed when <literal>Session.close()""</literal> or <literal>Session.disconnect()</literal> is called. If you wish ""to use this strategy in a cluster, you should ensure that the underlying ""cache implementation supports locking. The built-in cache providers do ""<emphasis>not</emphasis>."msgstr """If the application needs to update data, a <literal>read-write</literal> ""cache might be appropriate. This cache strategy should never be used if ""serializable transaction isolation level is required. If the cache is used ""in a JTA environment, you must specify the property <literal>hibernate.""transaction.manager_lookup_class</literal>, naming a strategy for obtaining ""the JTA <literal>TransactionManager</literal>. In other environments, you ""should ensure that the transaction is completed when <literal>Session.close()""</literal> or <literal>Session.disconnect()</literal> is called. If you wish ""to use this strategy in a cluster, you should ensure that the underlying ""cache implementation supports locking. The built-in cache providers do ""<emphasis>not</emphasis>."#. Tag: programlisting#: performance.xml:730#, no-c-formatmsgid """<![CDATA[<class name=\"eg.Cat\" .... >\n"" <cache usage=\"read-write\"/>\n"" ....\n"" <set name=\"kittens\" ... >\n"" <cache usage=\"read-write\"/>\n"" ....\n"" </set>\n""</class>]]>"msgstr ""#. Tag: title#: performance.xml:735#, no-c-formatmsgid "Strategy: nonstrict read/write"msgstr "Strategy: nonstrict read/write"#. Tag: para#: performance.xml:737#, no-c-formatmsgid """If the application only occasionally needs to update data (ie. if it is ""extremely unlikely that two transactions would try to update the same item ""simultaneously) and strict transaction isolation is not required, a ""<literal>nonstrict-read-write</literal> cache might be appropriate. If the ""cache is used in a JTA environment, you must specify <literal>hibernate.""transaction.manager_lookup_class</literal>. In other environments, you ""should ensure that the transaction is completed when <literal>Session.close()""</literal> or <literal>Session.disconnect()</literal> is called."msgstr """If the application only occasionally needs to update data (ie. if it is ""extremely unlikely that two transactions would try to update the same item ""simultaneously) and strict transaction isolation is not required, a ""<literal>nonstrict-read-write</literal> cache might be appropriate. If the ""cache is used in a JTA environment, you must specify <literal>hibernate.""transaction.manager_lookup_class</literal>. In other environments, you ""should ensure that the transaction is completed when <literal>Session.close()""</literal> or <literal>Session.disconnect()</literal> is called."#. Tag: title#: performance.xml:749#, no-c-formatmsgid "Strategy: transactional"msgstr "Strategy: transactional"#. Tag: para#: performance.xml:751#, no-c-formatmsgid """The <literal>transactional</literal> cache strategy provides support for ""fully transactional cache providers such as JBoss TreeCache. Such a cache ""may only be used in a JTA environment and you must specify ""<literal>hibernate.transaction.manager_lookup_class</literal>."msgstr """The <literal>transactional</literal> cache strategy provides support for ""fully transactional cache providers such as JBoss TreeCache. Such a cache ""may only be used in a JTA environment and you must specify ""<literal>hibernate.transaction.manager_lookup_class</literal>."#. Tag: para#: performance.xml:759#, no-c-formatmsgid """None of the cache providers support all of the cache concurrency strategies. ""The following table shows which providers are compatible with which ""concurrency strategies."msgstr """None of the cache providers support all of the cache concurrency strategies. ""The following table shows which providers are compatible with which ""concurrency strategies."#. Tag: title#: performance.xml:765#, no-c-formatmsgid "Cache Concurrency Strategy Support"msgstr "Cache Concurrency Strategy Support"#. Tag: entry#: performance.xml:775#, no-c-formatmsgid "read-only"msgstr "read-only"#. Tag: entry#: performance.xml:776#, no-c-formatmsgid "nonstrict-read-write"msgstr "nonstrict-read-write"#. Tag: entry#: performance.xml:777#, no-c-formatmsgid "read-write"msgstr "read-write"#. Tag: entry#: performance.xml:778#, no-c-formatmsgid "transactional"msgstr "transactional"#. Tag: title#: performance.xml:824#, no-c-formatmsgid "Managing the caches"msgstr "Managing the caches"#. Tag: para#: performance.xml:826#, no-c-formatmsgid """Whenever you pass an object to <literal>save()</literal>, <literal>update()</""literal> or <literal>saveOrUpdate()</literal> and whenever you retrieve an ""object using <literal>load()</literal>, <literal>get()</literal>, ""<literal>list()</literal>, <literal>iterate()</literal> or <literal>scroll()""</literal>, that object is added to the internal cache of the ""<literal>Session</literal>."msgstr """Whenever you pass an object to <literal>save()</literal>, <literal>update()</""literal> or <literal>saveOrUpdate()</literal> and whenever you retrieve an ""object using <literal>load()</literal>, <literal>get()</literal>, ""<literal>list()</literal>, <literal>iterate()</literal> or <literal>scroll()""</literal>, that object is added to the internal cache of the ""<literal>Session</literal>."#. Tag: para#: performance.xml:833#, no-c-formatmsgid """When <literal>flush()</literal> is subsequently called, the state of that ""object will be synchronized with the database. If you do not want this ""synchronization to occur or if you are processing a huge number of objects ""and need to manage memory efficiently, the <literal>evict()</literal> method ""may be used to remove the object and its collections from the first-level ""cache."msgstr """When <literal>flush()</literal> is subsequently called, the state of that ""object will be synchronized with the database. If you do not want this ""synchronization to occur or if you are processing a huge number of objects ""and need to manage memory efficiently, the <literal>evict()</literal> method ""may be used to remove the object and its collections from the first-level ""cache."#. Tag: programlisting#: performance.xml:841#, no-c-formatmsgid """<![CDATA[ScrollableResult cats = sess.createQuery(\"from Cat as cat\").scroll""(); //a huge result set\n""while ( cats.next() ) {\n"" Cat cat = (Cat) cats.get(0);\n"" doSomethingWithACat(cat);\n"" sess.evict(cat);\n""}]]>"msgstr ""#. Tag: para#: performance.xml:843#, no-c-formatmsgid """The <literal>Session</literal> also provides a <literal>contains()</literal> ""method to determine if an instance belongs to the session cache."msgstr """The <literal>Session</literal> also provides a <literal>contains()</literal> ""method to determine if an instance belongs to the session cache."#. Tag: para#: performance.xml:848#, no-c-formatmsgid """To completely evict all objects from the session cache, call ""<literal>Session.clear()</literal>"msgstr """To completely evict all objects from the session cache, call ""<literal>Session.clear()</literal>"#. Tag: para#: performance.xml:852#, no-c-formatmsgid ""
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -