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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Sep 12 04:04:55 EDT 2008


Author: xhuang at jboss.com
Date: 2008-09-12 04:04:55 -0400 (Fri, 12 Sep 2008)
New Revision: 78486

Modified:
   projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Cache_loaders.po
Log:
update

Modified: projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Cache_loaders.po
===================================================================
--- projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Cache_loaders.po	2008-09-12 08:04:19 UTC (rev 78485)
+++ projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Cache_loaders.po	2008-09-12 08:04:55 UTC (rev 78486)
@@ -8,7 +8,7 @@
 "Project-Id-Version: Cache_loaders\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n"
 "POT-Creation-Date: 2008-05-30 04:03+0000\n"
-"PO-Revision-Date: 2008-09-09 01:50+1000\n"
+"PO-Revision-Date: 2008-09-13 04:04+1000\n"
 "Last-Translator: \n"
 "Language-Team:  <en at li.org>\n"
 "MIME-Version: 1.0\n"
@@ -441,6 +441,8 @@
 "page=JBossCacheCacheLoaders\">this wiki page</ulink> for more discussion on "
 "this."
 msgstr ""
+"<emphasis role=\"bold\">注意</emphasis>:从 JBoss Cache 1.3.0 开始,CacheLoader 接口的定义已经修改,特别是其 <literal>get(Fqn fqn)</literal> 方法。自定义的 CacheLoader 实现尤其要注意这一点。细节请参考相关 javadoc,或访问其<ulink url=\"http://wiki.jboss.org/wiki/Wiki.jsp?"
+"page=JBossCacheCacheLoaders\"> wiki 页面</ulink>。"
 
 #. Tag: para
 #: Cache_loaders.xml:34
@@ -450,6 +452,8 @@
 "should also implement the subinterface org.jboss.cache.loader."
 "ExtendedCacheLoader:"
 msgstr ""
+"需要支持部分状态转换的 CacheLoader 实现也应该实现 org.jboss.cache.loader."
+"ExtendedCacheLoader 子接口:"
 
 #. Tag: programlisting
 #: Cache_loaders.xml:37
@@ -515,6 +519,65 @@
 "\n"
 "}"
 msgstr ""
+"public interface ExtendedCacheLoader extends CacheLoader\n"
+"{\n"
+"   /**\n"
+"    * Fetch a portion of the state for this cache from secondary storage \n"
+"    * (disk, DB) and return it as a byte buffer.\n"
+"    * This is for activation of a portion of new cache from a remote "
+"cache. \n"
+"    * The new cache would then call {@link #storeState(byte[], Fqn)}.\n"
+"    * \n"
+"    * @param subtree Fqn naming the root (i.e. highest level parent) node "
+"of\n"
+"    *                the subtree for which state is requested.\n"
+"    *                \n"
+"    * @see org.jboss.cache.TreeCache#activateRegion(String)\n"
+"    */\n"
+"   byte[] loadState(Fqn subtree) throws Exception;\n"
+"   \n"
+"   /**\n"
+"    * Store the given portion of the cache tree's state in secondary "
+"storage. \n"
+"    * Overwrite whatever is currently in secondary storage.  If the "
+"transferred \n"
+"    * state has Fqns equal to or children of parameter <code>subtree</"
+"code>, \n"
+"    * then no special behavior is required.  Otherwise, ensure that\n"
+"    * the state is integrated under the given 'subtree'. Typically\n"
+"    * in the latter case 'subtree' would be the Fqn of the buddy \n"
+"    * backup region for a buddy group; e.g.\n"
+"    * \n"
+"    * If the the transferred state had Fqns starting with \"/a\" and\n"
+"    * 'subtree' was \"/_BUDDY_BACKUP_/192.168.1.2:5555\" then the\n"
+"    * state should be stored in the local persistent store under\n"
+"    * \"/_BUDDY_BACKUP_/192.168.1.2:5555/a\"\n"
+"    * \n"
+"    * @param state   the state to store\n"
+"    * @param subtree Fqn naming the root (i.e. highest level parent) node "
+"of\n"
+"    *                the subtree included in 'state'.  If the Fqns  \n"
+"    *                of the data included in 'state' are not \n"
+"    *                already children of 'subtree', then their\n"
+"    *                Fqns should be altered to make them children of \n"
+"    *                'subtree' before they are persisted.\n"
+"    */   \n"
+"   void storeState(byte[] state, Fqn subtree) throws Exception;\n"
+"   \n"
+"   /**\n"
+"    * Sets the {@link RegionManager} this object should use to manage \n"
+"    * marshalling/unmarshalling of different regions using different\n"
+"    * classloaders.\n"
+"    *\n"
+"    * NOTE: This method is only intended to be used by the TreeCache "
+"instance \n"
+"    * this cache loader is associated with.\n"
+"    * \n"
+"    * @param manager    the region manager to use, or <code>null</code>.\n"
+"    */\n"
+"   void setRegionManager(RegionManager manager);\n"
+"\n"
+"}"
 
 #. Tag: para
 #: Cache_loaders.xml:38
@@ -524,7 +587,7 @@
 "with buddy replication, the cache loader must implement "
 "<literal>ExtendedCacheLoader</literal> unless its "
 "<literal>FetchPersistentState</literal> property is set to false."
-msgstr ""
+msgstr "<emphasis role=\"bold\">注意</emphasis>:如果缓存加载器和 Buddy 复制一起使用,缓存加载器必须实现 <literal>ExtendedCacheLoader</literal>,除非把它的 <literal>FetchPersistentState</literal> 设置成了 false。"
 
 #. Tag: para
 #: Cache_loaders.xml:41
@@ -539,12 +602,14 @@
 "with custom ExtendedCacheLoader implementations to ensure this new contract "
 "is still adhered to."
 msgstr ""
+"<emphasis role=\"bold\">注意</emphasis>:从 JBoss "
+"Cache 1.4.0 开始,<literal>ExtendedCacheLoader</literal> 接口的定义已经发生了变动,尤其是要求把传递给 <literal>storeState</literal> 方法的数据集成在指定的子树下,即使这些数据不是该子树产生的。这种行为对于正确地支持 Buddy 复制是必需的。对于自定义的 ExtendedCacheLoader 实现,你需要格外小心来确保它符合新的接口定义。"
 
 #. Tag: title
 #: Cache_loaders.xml:45
 #, no-c-format
 msgid "The CacheLoader Interface"
-msgstr ""
+msgstr "CacheLoader 接口"
 
 #. Tag: para
 #: Cache_loaders.xml:46
@@ -555,7 +620,7 @@
 "null, an instance of each configured <literal>cacheloader</literal> is "
 "created when the cache is created. Since <literal>CacheLoader</literal> "
 "extends <literal>Service</literal>,"
-msgstr ""
+msgstr "JBoss Cache 和 CacheLoader 实现之间的关系如下。当 <literal>CacheLoaderConfiguration</literal> 非空时,缓存创建时将创建每个配置的 <literal>cacheloader</literal> 实例。既然 <literal>CacheLoader</literal> 继承了 <literal>Service</literal>,"
 
 #. Tag: programlisting
 #: Cache_loaders.xml:49
@@ -571,6 +636,15 @@
 "   void destroy();\n"
 "}"
 msgstr ""
+"public interface Service {\n"
+"   void create() throws Exception;\n"
+"\n"
+"   void start() throws Exception;\n"
+"\n"
+"   void stop();\n"
+"\n"
+"   void destroy();\n"
+"}"
 
 #. Tag: para
 #: Cache_loaders.xml:50
@@ -581,6 +655,9 @@
 "()</literal> and <literal>destroy()</literal> are called when the cache is "
 "stopped."
 msgstr ""
+"但启动缓存时,<literal>CacheLoader.create()</literal> 和 <literal>CacheLoader.start()</"
+"literal> 被调用。当缓存停止时则相应地调用 <literal>stop"
+"()</literal> 和 <literal>destroy()</literal>。"
 
 #. Tag: para
 #: Cache_loaders.xml:53
@@ -590,7 +667,7 @@
 "called. The latter can be used to store a reference to the cache, the former "
 "is used to configure this instance of the CacheLoader. For example, here a "
 "database CacheLoader could establish a connection to the database."
-msgstr ""
+msgstr "之后,<literal>setConfig()</literal> 和 <literal>setCache()</literal> 被调用。后者可以用来存储对缓存的引用,前者可以用来配置 CacheLoader 的这个实例。例如,这里的数据库 CacheLoader 实例可以建立和数据库的连接。"
 
 #. Tag: para
 #: Cache_loaders.xml:56
@@ -602,6 +679,8 @@
 "set/remove the value immediately. These methods are described as javadoc "
 "comments in the above interface."
 msgstr ""
+"CacheLoader 接口有一系列方法在没有使用事务时可以调用:<literal>get()</literal>、 <literal>put()</literal>、"
+"<literal>remove()</literal> 和 <literal>removeData()</literal>:它们立即读取/写入/删除值。上述接口的 javadoc 注释里描述了这些方法。"
 
 #. Tag: para
 #: Cache_loaders.xml:59
@@ -619,6 +698,9 @@
 "the CacheLoader <emphasis>must</emphasis> be able to commit (or rollback) "
 "the transaction successfully."
 msgstr ""
+"和事务相关的有 3 个方法:<literal>prepare()</literal>、<literal>commit()</literal> 和 "
+"<literal>rollback()</literal>。当事务提交时 <literal>prepare()</literal> 被调用。它以事务对象和修改列表作为参数。事务对象可以用作事务 hashmap 的键,其值就是修改列表。每个修改列表都有大量的 <literal>Modification</"
+"literal> 元素,代表着给定事务对缓存的修改。当 <literal>prepare()</literal> 成功返回时,CacheLoader <emphasis>必须</emphasis>能够成功提交(或回滚)事务。"
 
 #. Tag: para
 #: Cache_loaders.xml:62
@@ -630,6 +712,8 @@
 "those methods on a loader, the cache will only enlist the loader with the "
 "TransactionManager on the same transaction."
 msgstr ""
+"目前,TreeCache 负责在适当时候调用 prepare()、commit() 和 "
+"rollback()。我们希望创建 TreeCache 和 CacheLoaders XA 资源,这样缓存将只支持带有TransactionManager 的加载器,而不是调用加载器上的这些方法。"
 
 #. Tag: para
 #: Cache_loaders.xml:65




More information about the jboss-cvs-commits mailing list