[jboss-cvs] JBossAS SVN: r77745 - projects/docs/enterprise/4.3/Cache/Cache_FAQ/zh-CN.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Sep 1 06:02:54 EDT 2008


Author: xhuang at jboss.com
Date: 2008-09-01 06:02:54 -0400 (Mon, 01 Sep 2008)
New Revision: 77745

Modified:
   projects/docs/enterprise/4.3/Cache/Cache_FAQ/zh-CN/Cache_Frequently_Asked_Questions.po
Log:
update

Modified: projects/docs/enterprise/4.3/Cache/Cache_FAQ/zh-CN/Cache_Frequently_Asked_Questions.po
===================================================================
--- projects/docs/enterprise/4.3/Cache/Cache_FAQ/zh-CN/Cache_Frequently_Asked_Questions.po	2008-09-01 09:57:12 UTC (rev 77744)
+++ projects/docs/enterprise/4.3/Cache/Cache_FAQ/zh-CN/Cache_Frequently_Asked_Questions.po	2008-09-01 10:02:54 UTC (rev 77745)
@@ -5,7 +5,7 @@
 "Project-Id-Version: Cache_Frequently_Asked_Questions\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n"
 "POT-Creation-Date: 2008-05-30 03:54+0000\n"
-"PO-Revision-Date: 2008-09-01 17:28+1000\n"
+"PO-Revision-Date: 2008-09-01 20:02+1000\n"
 "Last-Translator: Xi HUANG <xhuang at redhat.com>\n"
 "Language-Team: Chinese Simplified <kde-i18n-doc at lists.kde.org>\n"
 "MIME-Version: 1.0\n"
@@ -1252,13 +1252,13 @@
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1011
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "Yes, you can. Originally, <literal>TreeCache</literal> Marshalling was "
 "designed as a workaround for those replicated caches that upon state "
 "transfer did not have access to the classloaders defining the objects in the "
 "cache."
-msgstr "可以。<literal>TreeCache</literal> 原来的解码"
+msgstr "可以。<literal>TreeCache</literal> 原来的解码机制的设计目的是作为复制缓存在状态转换不能访问定义对象的类加载器时的绕开办法。"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1016
@@ -1274,7 +1274,7 @@
 "would result on a ClassCastException. This is because even though the class "
 "names are the same, the class definitions are not. The current classloader "
 "is different to the one when the classes were originally put."
-msgstr ""
+msgstr "每次部署时,JBoss 都会为每个顶层部署创建一个新的类加载器,例如为 EAR 文件。你也得记住应用服务器里的类不仅由类名也由自己的类加载器定义。所以,假设缓存没有作为部署的一部分部署,你也可以部署应用程序并把属于这个部署的类的实例放入缓存。如果你进行重部署并试图进行前面所放入的数据的 get 操作,就会导致 ClassCastException 异常。这是因为即使类名相同,类定义也会不同。当前的类加载器和最开始放入类时的不同。"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1026
@@ -1289,11 +1289,11 @@
 "some kind of persistence backing where the data survives, for example using "
 "CacheLoaders, or when JBossCache is used as a second level cache in a "
 "persistence framework."
-msgstr ""
+msgstr "通过启用 marshalling,你可以控制缓存中数据的生命周期,在卸载时,你取消激活 region 并取消部署时注册的类加载器,你将在本地剔除缓存里的数据。这意味着在下一次部署时,数据不会在缓存里,因此避开这个问题。很明显,使用 marshalling 来绕开这个问题只适用于你具有某种持久化数据的支持(如使用类加载器),或在持久性框架里把 JBossCache 当作二级缓存的时候。"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1035
-#, no-c-format
+#, fuzzy, no-c-format
 msgid ""
 "To implement this feature, please follow the instructions indicated in the "
 "example located in the TreeCacheMarshaller section of the user's guide. It's "
@@ -1302,7 +1302,7 @@
 "lifecycle methods, such as <literal>start()</literal> and <literal>stop()</"
 "literal>. The key would be for this MBean to depend on the target cache, so "
 "that it can operate as long as the cache is up and running."
-msgstr ""
+msgstr "要实现这个特征,请遵循《用户手册》里 TreeCacheMarshaller 部分的例程中的说明。"
 
 #. Tag: title
 #: Cache_Frequently_Asked_Questions.xml:1049
@@ -1525,13 +1525,13 @@
 msgid ""
 "In aopc, you specify the src path for a specific directory. To pre-compile "
 "multiple ones, you will need to invoke aopc multiple times."
-msgstr ""
+msgstr "对于 aopc,你可以指定为特殊目录指定源路径。要预编译多个目录,你将需要多次调用 aopc。"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1263
 #, no-c-format
 msgid "What's in the <literal>jboss-aop.xml</literal> configuration?"
-msgstr ""
+msgstr "<literal>jboss-aop.xml</literal> 配置文件的内容是什么?"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1270
@@ -1546,6 +1546,8 @@
 "CacheInterceptor</literal> to this POJO to perform object mapping and "
 "relationship management."
 msgstr ""
+"POJO instrumentation 需要 <literal>jboss-aop.xml</literal> 文件。在 <literal>jboss-aop.xml</literal> 文件里,你可以声明自己的 POJO(如 <literal>Person</literal>)为 \"prepared\",这是一个表示对象将被系统 \"aspectized\" 的 JBossAop 术语。在这个声明之后,JBossAop 将调用任何和这个 POJO 相关的拦截器。PojoCache 将动态地添加 <"
+"literal>org.jboss.cache.aop.CacheInterceptor</literal> 到这个 POJO 里来执行对象映射和关系管理。"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1288
@@ -1553,13 +1555,13 @@
 msgid ""
 "Note that to add your POJO, you should declare all the fields to be "
 "\"prepared\" as in the example."
-msgstr ""
+msgstr "请注意,要添加自己的 POJO,如这个例子所示,你应该把所有的字段声明为 \"prepared\"。"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1296
 #, no-c-format
 msgid "Can I use annotation instead of the xml declaration?"
-msgstr ""
+msgstr "我可以使用注解而不是 XML 声明吗?"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1300
@@ -1567,7 +1569,7 @@
 msgid ""
 "Yes, starting with JBossCache 1.3, you can use annotation to instrument your "
 "POJO for both JDK1.4 and 1.5. Check the documentation for details."
-msgstr ""
+msgstr "可以。从 JBossCache 1.3 开始,你可以使用注解来 instrument 用于 JDK1.4 和 1.5 的 POJO。请参考相关文档。"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1308
@@ -1748,7 +1750,7 @@
 msgid ""
 "How do I use <literal>List</literal> , <literal>Set</literal> , and "
 "<literal>Map</literal> dynamic proxy?"
-msgstr ""
+msgstr "我怎样使用 <literal>List</literal>、<literal>Set</literal> 和 <literal>Map</literal> 动态代理?"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1492
@@ -1758,7 +1760,7 @@
 "<literal>Set</literal> , and <literal>Map</literal> without users to declare "
 "them \"aspectized\". It is done via a dynamic proxy. Here is a code snippet "
 "to use an <literal>ArrayList</literal> proxy class."
-msgstr ""
+msgstr "PojoCache 支持继承 <literal>List</literal>、<literal>Set</literal> 和 <literal>Map</literal> 的类,用户不需要将其声明为 \"aspectized\"。这是通过动态代理完成的。下面是一个使用 <literal>ArrayList</literal> 代理类的例子。"
 
 #. Tag: programlisting
 #: Cache_Frequently_Asked_Questions.xml:1504
@@ -1780,6 +1782,21 @@
 "        myList.add(\"third\");\n"
 "        myList.remove(\"third\");"
 msgstr ""
+"ArrayList list = new ArrayList();\n"
+"        list.add(\"first\");\n"
+"\n"
+"        cache.putObject(\"/list/test\", list); \n"
+"        // Put the list under the aop cache\n"
+"        list.add(\"second\"); \n"
+"        // Won't work since AOP intercepts the dynamic proxy not the "
+"original POJO.\n"
+"\n"
+"        ArrayList myList = (List)cache.getObject(\"/list/test\"); \n"
+"        // we are getting a dynamic proxy instead\n"
+"        myList.add(\"second\"); \n"
+"        // it works now\n"
+"        myList.add(\"third\");\n"
+"        myList.remove(\"third\");"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1510
@@ -1844,7 +1861,7 @@
 msgid ""
 "What happens when my \"aspectized\" POJO has field members that are of "
 "Collection class ?"
-msgstr ""
+msgstr "当我的 \"aspectized\" POJO 具有集合类型的字段成员时会发生什么事情?"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1556
@@ -1855,7 +1872,7 @@
 "well. When the field member is of a Collection class (e.g., List, Set, or "
 "Map), PojoCache will first map the collection into cache. Then, it will swap "
 "out dynamically the field reference with an corresponding proxy reference."
-msgstr ""
+msgstr "当用户通过调用 <literal>putObject</literal> 把 POJO 置入缓存时,它将递归地把字段成员映射到缓存里。当字段成员是集合类型(如 List、Set 或 Map)时,PojoCache 将首先把集合映射到缓存里。然后,它将动态地把字段引用和相应的代理引用进行交换。"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1565
@@ -1863,13 +1880,13 @@
 msgid ""
 "This is necessary so that an internal update on the field member will be "
 "intercepted by the cache."
-msgstr ""
+msgstr "为了使对字段成员的内部更新可以被缓存拦截,这是必需的。"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1574
 #, no-c-format
 msgid "What are the limitation of Collection classes in PojoCache?"
-msgstr ""
+msgstr "PojoCache 里的集合类有什么限制?"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1578
@@ -1878,7 +1895,7 @@
 "Use of Collection class in PojoCache helps you to track fine-grained changes "
 "in your collection fields automatically. However, current implementation has "
 "the follow limitation that we plan to address soon."
-msgstr ""
+msgstr "在 PojoCache 里使用集合类可以帮你自动地跟踪集合字段里的细小变化。然而,目前的实现有如下的限制,我们正计划尽快解决。"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1582
@@ -1892,7 +1909,7 @@
 "java.util.HashSet implementation. The List interface maps to java.util."
 "ArrayList implementation. The Map interface maps to java.util.HashMap "
 "implementation."
-msgstr ""
+msgstr "目前,我们只支持有限的对集合类的实现。那就是,我们支持和 List、Set 和 Map 相关的 API。然而,既然这些 API 并没有对空键或值的限制,这就使得用户实例和代理之间的映射较难处理。例如,ArrayList 将允许 NUL 值而其他实现不会允许。Set 接口映射 java.util.HashSet 实现。List 接口对应 java.util.ArrayList 实现。Map 接口对应 java.util.HashMap 实现。"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1590
@@ -1903,19 +1920,19 @@
 "slow. Performance between Set, Map and List collections also vary. Adding "
 "items to a Set is slower than a List or Map, since Set does not allow "
 "duplicate entries."
-msgstr ""
+msgstr "另外一个相关的问题是性能。例如,目前的实现是按顺序的,所以从集合里进行插入/删除很慢。Set、 Map 和 List 集合的性能各自不同。在 Set 里添加条目比在 List 或 Map 里添加要慢,因为 Set 不允许重复条目。"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1604
 #, no-c-format
 msgid "What are the pros and cons of PojoCache?"
-msgstr ""
+msgstr "PojoCache 的优缺点各是什么?"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1608
 #, no-c-format
 msgid "As mentioned in the reference doc, PojoCache has the following advantages:"
-msgstr ""
+msgstr "如参考文档里搜提及的,PojoCache 具有下列的优点:"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1611
@@ -1996,7 +2013,7 @@
 #: Cache_Frequently_Asked_Questions.xml:1664
 #, no-c-format
 msgid "Does JBoss Cache support eviction policies?"
-msgstr ""
+msgstr "JBoss Cache 支持 eviction 策略吗?"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1668
@@ -2010,6 +2027,8 @@
 "<literal>FIFOPolicy</literal> that evicts the node based on FIFO principle "
 "only."
 msgstr ""
+"是的。JBoss Cache 目前为 TreeCache 和 PojoCache 都实现了其相关的 LRU eviction 策略:<literal>org.jboss.cache.eviction.LRUPolicy</literal> 和 <literal>org.jboss.cache.aop.eviction.AopLRUPolicy</literal>。用户也可以置入自己的 eviction 策略算法。相关细节请参考用户手册。目前有一个用户所贡献的策略 <literal>FIFOPolicy<"
+"/literal>,它仅仅基于 FIFO 原则剔除节点。"
 
 #. Tag: para
 #: Cache_Frequently_Asked_Questions.xml:1689




More information about the jboss-cvs-commits mailing list