[jboss-cvs] JBossAS SVN: r78727 - 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
Sat Sep 20 04:24:45 EDT 2008


Author: xhuang at jboss.com
Date: 2008-09-20 04:24:45 -0400 (Sat, 20 Sep 2008)
New Revision: 78727

Modified:
   projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Configuration.po
   projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Eviction_policies.po
   projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/State_transfer.po
   projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Treecache_marshaller.po
Log:
update

Modified: projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Configuration.po
===================================================================
--- projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Configuration.po	2008-09-20 07:31:45 UTC (rev 78726)
+++ projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Configuration.po	2008-09-20 08:24:45 UTC (rev 78727)
@@ -9,7 +9,7 @@
 "Project-Id-Version: Configuration\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-08 23:53+1000\n"
+"PO-Revision-Date: 2008-09-20 18:24+1000\n"
 "Last-Translator: \n"
 "Language-Team:  <en at li.org>\n"
 "MIME-Version: 1.0\n"
@@ -857,12 +857,14 @@
 "release number, with any SP qualifer also separated by a dot, e.g. \"1.2.3\" "
 "or \"1.2.4.SP2\"."
 msgstr ""
+"通知缓存以和给定 JBoss Cache 版本使用的一致的格式序列化群集通信。不同的 JBoss Cache 版本使用不同的线格式(wire format);设置这个属性将告诉以后的版本用前一版本的格式序列化数据。这允许不同版本的缓存互用。例如,1.2.4.SP2 版本的缓存可以把这个值设置为 \"1.2.3\",允许它和 1.2.3 版本的缓存互用。有效值必须是用小数点隔开的版本号码,任何 SP 限定符也要用小数点隔开,如 \"1.2.3\" "
+"或 \"1.2.4.SP2\"。"
 
 #. Tag: para
 #: Configuration.xml:241
 #, no-c-format
 msgid "ReplQueueInterval"
-msgstr ""
+msgstr "ReplQueueInterval"
 
 #. Tag: para
 #: Configuration.xml:246
@@ -870,25 +872,25 @@
 msgid ""
 "Time in milliseconds for elements from the replication queue to be "
 "replicated."
-msgstr ""
+msgstr "复制队列里的元素被复制的时间间隔(毫秒)。"
 
 #. Tag: para
 #: Configuration.xml:253
 #, no-c-format
 msgid "ReplQueueMaxElements"
-msgstr ""
+msgstr "ReplQueueMaxElements"
 
 #. Tag: para
 #: Configuration.xml:258
 #, no-c-format
 msgid "Max number of elements in the replication queue until replication kicks in."
-msgstr ""
+msgstr "复制开始前复制队列里允许的元素的最大数目。"
 
 #. Tag: para
 #: Configuration.xml:265
 #, no-c-format
 msgid "SyncCommitPhase"
-msgstr ""
+msgstr "SyncCommitPhase"
 
 #. Tag: para
 #: Configuration.xml:270
@@ -900,13 +902,13 @@
 "penalty to enabling this, especially when running in a large cluster, but "
 "the upsides are greater cluster-wide data integrity. See the chapter on "
 "Clustered Caches for more information on this."
-msgstr ""
+msgstr "在使用 REPL_SYNC(没有应用于其他缓存节点)时,这个选项用于控制两阶段提交协议的提交阶段的行为。它缺省为 <literal>false</literal>。启用它会有性能上的大家,特别是运行在大型的群集里,但好处是更好的群集范围的数据集成性。更多信息请参考 Clustered Cache 章节。"
 
 #. Tag: para
 #: Configuration.xml:277
 #, no-c-format
 msgid "SyncReplTimeout"
-msgstr ""
+msgstr "SyncReplTimeout"
 
 #. Tag: para
 #: Configuration.xml:282
@@ -914,13 +916,13 @@
 msgid ""
 "For synchronous replication: time in milliseconds to wait until replication "
 "acks have been received from all nodes in the cluster."
-msgstr ""
+msgstr "用于同步复制:从群集里所有节点收到复制响应前所等待的时间(毫秒)。"
 
 #. Tag: para
 #: Configuration.xml:289
 #, no-c-format
 msgid "SyncRollbackPhase"
-msgstr ""
+msgstr "SyncRollbackPhase"
 
 #. Tag: para
 #: Configuration.xml:294
@@ -932,13 +934,13 @@
 "performance penalty to enabling this, especially when running in a large "
 "cluster, but the upsides are greater cluster-wide data integrity. See the "
 "chapter on Clustered Caches for more information on this."
-msgstr ""
+msgstr "在使用 REPL_SYNC(没有应用于其他缓存节点)时,这个选项用于控制两阶段提交协议的回滚部分的行为。它缺省为 <literal>false</literal>。启用它会有性能上的大家,特别是运行在大型的群集里,但好处是更好的群集范围的数据集成性。更多信息请参考 Clustered Cache 章节。"
 
 #. Tag: para
 #: Configuration.xml:301
 #, no-c-format
 msgid "TransactionManagerLookupClass"
-msgstr ""
+msgstr "TransactionManagerLookupClass"
 
 #. Tag: para
 #: Configuration.xml:306
@@ -947,13 +949,13 @@
 "The fully qualified name of a class implementing TransactionManagerLookup. "
 "Default is JBossTransactionManagerLookup. There is also an option of "
 "DummyTransactionManagerLookup for example."
-msgstr ""
+msgstr "实现 TransactionManagerLookup 的类的全限定名。缺省值为 JBossTransactionManagerLookup。这里也有一个作为示例的 DummyTransactionManagerLookup 选项。"
 
 #. Tag: para
 #: Configuration.xml:313
 #, no-c-format
 msgid "UseInterceptorMbeans"
-msgstr ""
+msgstr "UseInterceptorMbeans"
 
 #. Tag: para
 #: Configuration.xml:318
@@ -963,13 +965,13 @@
 "registered. Interceptor mbeans are used to capture statistics and display "
 "them in JMX. This setting enables or disables all such interceptor mbeans. "
 "Default value is <emphasis>true</emphasis>."
-msgstr ""
+msgstr "指定每个拦截器是否应该注册相关联的 MBean。拦截器 Mbean 用于捕获统计信息并显示在 JMX 里。这个设置启用或禁止所有这样的拦截器 MBean。缺省值为 <emphasis>true</emphasis>。"
 
 #. Tag: para
 #: Configuration.xml:325
 #, no-c-format
 msgid "UseRegionBasedMarshalling"
-msgstr ""
+msgstr "UseRegionBasedMarshalling"
 
 #. Tag: para
 #: Configuration.xml:330
@@ -978,13 +980,13 @@
 "When unmarshalling replicated data, this option specifies whether or not to "
 "use different classloaders (for different cache regions). This defaults to "
 "<literal>false</literal> if unspecified."
-msgstr ""
+msgstr "当散集复制的数据时,这个选项指定是否使用不同的类加载器(针对不同的缓存 region)。如果不指定,它的缺省值为 <literal>false</literal>。"
 
 #. Tag: para
 #: Configuration.xml:337
 #, no-c-format
 msgid "UseReplQueue"
-msgstr ""
+msgstr "UseReplQueue"
 
 #. Tag: para
 #: Configuration.xml:342
@@ -992,13 +994,13 @@
 msgid ""
 "For asynchronous replication: whether or not to use a replication queue "
 "(true/false)."
-msgstr ""
+msgstr "用于异步复制:是否使用复制队列(true/false)。"
 
 #. Tag: para
 #: Configuration.xml:349
 #, no-c-format
 msgid "LockParentForChildInsertRemove"
-msgstr ""
+msgstr "LockParentForChildInsertRemove"
 
 #. Tag: para
 #: Configuration.xml:354
@@ -1010,13 +1012,13 @@
 "This prevents phantom reads, providing \"stronger-than-repeatable-read\" "
 "data integrity. This defaults to <literal>false</literal> and is ignored if "
 "used with optimistic locking or other isolation levels."
-msgstr ""
+msgstr "但和悲观锁一起使用且 <literal>IsolationLevel</literal> 为 <literal>REPEATABLE_READ</literal> 时,这个参数指定当添加或删除子节点时父节点是否需要写锁。这防止了读取错误,提供了 \"stronger-than-repeatable-read\" 的数据集成度。它的缺省值为 <literal>false</literal>,如果和悲观锁一起使用并使用其他隔离级别,它将被忽略。"
 
 #. Tag: title
 #: Configuration.xml:365
 #, no-c-format
 msgid "Overriding options"
-msgstr ""
+msgstr "Overriding options"
 
 #. Tag: para
 #: Configuration.xml:366
@@ -1031,4 +1033,8 @@
 "literal>. See the javadocs on the <literal>Option</literal> class for "
 "details on these options."
 msgstr ""
+"从 JBoss Cache 1.3.0 开始,我们引人了一个新的 API,允许你覆盖每一个调用的缓存行为。这包括创建 <literal>org.jboss.cache.config.Option</"
+"literal> 实例,在 <literal>Option</"
+"literal> 对象设置你需要覆盖的选项并作为参数传递给 <literal>get()</literal>、<literal>put()</literal> 和 <literal>remove()</"
+"literal> 的重载版本。关于这些选项的更多细节,请参考 <literal>Option</literal> 类的 javadoc 文档。"
 

Modified: projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Eviction_policies.po
===================================================================
--- projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Eviction_policies.po	2008-09-20 07:31:45 UTC (rev 78726)
+++ projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Eviction_policies.po	2008-09-20 08:24:45 UTC (rev 78727)
@@ -1,24 +1,26 @@
+# translation of Eviction_policies.po to
 # Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 # Automatically generated, 2007.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: Eviction_policies\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n"
 "POT-Creation-Date: 2008-05-30 04:03+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-09-20 13:12+1000\n"
+"Last-Translator: \n"
+"Language-Team:  <en at li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
 
 #. Tag: title
 #: Eviction_policies.xml:10
 #, no-c-format
 msgid "Eviction Policies"
-msgstr ""
+msgstr "逐出策略(Eviction Policy)"
 
 #. Tag: para
 #: Eviction_policies.xml:11
@@ -28,13 +30,13 @@
 "e.g., life time and maximum numbers allowed. Memory constraints on servers "
 "mean caches cannot grow indefinitely, so policies need to be in place to "
 "restrict the size of the cache in memory."
-msgstr ""
+msgstr "逐出策略指定驻留在缓存里的节点的行为,例如,生存时间和允许的最大数目。服务器内存的限制意味着缓存不可能无限制地增长,所以需要相应的策略来限制缓存的大小。"
 
 #. Tag: title
 #: Eviction_policies.xml:15
 #, no-c-format
 msgid "Eviction Policy Plugin"
-msgstr ""
+msgstr "逐出策略插件"
 
 #. Tag: para
 #: Eviction_policies.xml:16
@@ -52,6 +54,8 @@
 "events back to a defined eviction behavior. It's the policy provider's "
 "responsibility to decide when to call back the cache \"evict\" operation."
 msgstr ""
+"JBoss Cache 的逐出策略框架的设计基于松耦合的 observable 模式(虽然仍是同步的),Eviction Region 管理者将注册一个 <literal>TreeCacheListener</literal> 来处理缓存事件并将其传递回逐出策略。每当添加、删除、逐出或访问一个缓存节点,注册的 <literal>TreeCacheListener</literal> 将维护状态信息,其统计信息将被传递到每个单独的 Eviction "
+"Region。每个 Region 可以定义一个不同的 <literal>EvictionPolicy</literal> 实现,它知道如何将缓存的添加、删除、访问事件关联回定义好的逐出行为。决定何时回调缓存的“逐出”操作是策略提供者的职责。"
 
 #. Tag: para
 #: Eviction_policies.xml:19
@@ -63,7 +67,7 @@
 "removes and visits (gets) to the cache during the configured interval. The "
 "eviction thread is responsible for kicking off the eviction policy "
 "processing (a single pass) for each configured eviction cache region."
-msgstr ""
+msgstr "单个的逐出线程(定时器)将根据配置好的时间间隔运行。这个线程对每个策略提供者进行调用并通知在这段时间间隔中任何 <literal>TreeCacheListener</literal> 所关联的添加、删除和访问(get)事件。逐出线程负责为每个配置的 eviction region 启动逐出策略处理。"
 
 #. Tag: para
 #: Eviction_policies.xml:22
@@ -76,12 +80,15 @@
 "of these interface implementations define all the underlying mechanics "
 "necessary for a complete eviction policy implementation."
 msgstr ""
+"为了实现逐出策略,下面的接口必须被实现:org.jboss.cache.eviction.EvictionPolicy、org.jboss.cache."
+"eviction.EvictionAlgorithm、org.jboss.cache.eviction.EvictionQueue 和 org."
+"jboss.cache.eviction.EvictionConfiguration。当组合在一起时,这些接口实现定义了完整逐出策略实现所需的底层机制。"
 
 #. Tag: title
 #: Eviction_policies.xml:26
 #, no-c-format
 msgid "TreeCache eviction UML Diagram"
-msgstr ""
+msgstr "TreeCache 逐出的 UML 图"
 
 #. Tag: programlisting
 #: Eviction_policies.xml:33
@@ -139,6 +146,57 @@
 "\n"
 "}"
 msgstr ""
+"public interface EvictionPolicy\n"
+"{\n"
+"   /**\n"
+"    * Evict a node form the underlying cache.\n"
+"    *\n"
+"    * @param fqn DataNode corresponds to this fqn.\n"
+"    * @throws Exception\n"
+"    */\n"
+"   void evict(Fqn fqn) throws Exception;\n"
+"\n"
+"   /**\n"
+"    * Return children names as Objects\n"
+"    *\n"
+"    * @param fqn\n"
+"    * @return Child names under given fqn\n"
+"    */\n"
+"   Set getChildrenNames(Fqn fqn);\n"
+"\n"
+"   /**\n"
+"    * Is this a leaf node?\n"
+"    *\n"
+"    * @param fqn\n"
+"    * @return true/false if leaf node.\n"
+"    */\n"
+"   boolean hasChild(Fqn fqn);\n"
+"\n"
+"   Object getCacheData(Fqn fqn, Object key);\n"
+"\n"
+"   /**\n"
+"    * Method called to configure this implementation.\n"
+"    */\n"
+"   void configure(TreeCache cache);\n"
+"\n"
+"   /**\n"
+"    * Get the associated EvictionAlgorithm used by the EvictionPolicy.\n"
+"    * &lt;p/&gt;\n"
+"    * This relationship should be 1-1.\n"
+"    *\n"
+"    * @return An EvictionAlgorithm implementation.\n"
+"    */\n"
+"   EvictionAlgorithm getEvictionAlgorithm();\n"
+"\n"
+"   /**\n"
+"    * The EvictionConfiguration implementation class used by this "
+"EvictionPolicy.\n"
+"    *\n"
+"    * @return EvictionConfiguration implementation class.\n"
+"    */\n"
+"   Class getEvictionConfigurationClass();\n"
+"\n"
+"}"
 
 #. Tag: programlisting
 #: Eviction_policies.xml:34
@@ -174,6 +232,35 @@
 "\n"
 "}"
 msgstr ""
+"public interface EvictionAlgorithm\n"
+"{\n"
+"   /**\n"
+"    * Entry point for evictin algorithm. This is an api called by the "
+"EvictionTimerTask\n"
+"    * to process the node events in waiting and actual pruning, if "
+"necessary.\n"
+"    *\n"
+"    * @param region Region that this algorithm will operate on.\n"
+"    */\n"
+"   void process(Region region) throws EvictionException;\n"
+"\n"
+"   /**\n"
+"    * Reset the whole eviction queue. Queue may needs to be reset due to "
+"corrupted state, \n"
+"    * for example.\n"
+"    *\n"
+"    * @param region Region that this algorithm will operate on.\n"
+"    */\n"
+"   void resetEvictionQueue(Region region);\n"
+"\n"
+"   /**\n"
+"    * Get the EvictionQueue implementation used by this algorithm.\n"
+"    *\n"
+"    * @return the EvictionQueue implementation.\n"
+"    */\n"
+"   EvictionQueue getEvictionQueue();\n"
+"\n"
+"}"
 
 #. Tag: programlisting
 #: Eviction_policies.xml:35
@@ -243,6 +330,69 @@
 "\n"
 "}"
 msgstr ""
+"public interface EvictionQueue\n"
+"{\n"
+"   /**\n"
+"    * Get the first entry in the queue.\n"
+"    * &lt;p/&gt;\n"
+"    * If there are no entries in queue, this method will return null.\n"
+"    * &lt;p/&gt;\n"
+"    * The first node returned is expected to be the first node to evict.\n"
+"    *\n"
+"    * @return first NodeEntry in queue.\n"
+"    */\n"
+"   public NodeEntry getFirstNodeEntry();\n"
+"\n"
+"   /**\n"
+"    * Retrieve a node entry by Fqn.\n"
+"    * &lt;p/&gt;\n"
+"    * This will return null if the entry is not found.\n"
+"    *\n"
+"    * @param fqn Fqn of the node entry to retrieve.\n"
+"    * @return Node Entry object associated with given Fqn param.\n"
+"    */\n"
+"   public NodeEntry getNodeEntry(Fqn fqn);\n"
+"\n"
+"   public NodeEntry getNodeEntry(String fqn);\n"
+"\n"
+"   /**\n"
+"    * Check if queue contains the given NodeEntry.\n"
+"    *\n"
+"    * @param entry NodeEntry to check for existence in queue.\n"
+"    * @return true/false if NodeEntry exists in queue.\n"
+"    */\n"
+"   public boolean containsNodeEntry(NodeEntry entry);\n"
+"\n"
+"   /**\n"
+"    * Remove a NodeEntry from queue.\n"
+"    * &lt;p/&gt;\n"
+"    * If the NodeEntry does not exist in the queue, this method will return "
+"normally.\n"
+"    *\n"
+"    * @param entry The NodeEntry to remove from queue.\n"
+"    */\n"
+"   public void removeNodeEntry(NodeEntry entry);\n"
+"\n"
+"   /**\n"
+"    * Add a NodeEntry to the queue.\n"
+"    *\n"
+"    * @param entry The NodeEntry to add to queue.\n"
+"    */\n"
+"   public void addNodeEntry(NodeEntry entry);\n"
+"\n"
+"   /**\n"
+"    * Get the size of the queue.\n"
+"    *\n"
+"    * @return The number of items in the queue.\n"
+"    */\n"
+"   public int size();\n"
+"\n"
+"   /**\n"
+"    * Clear the queue.\n"
+"    */\n"
+"   public void clear();\n"
+"\n"
+"}"
 
 #. Tag: programlisting
 #: Eviction_policies.xml:36
@@ -283,13 +433,47 @@
 "   public void parseXMLConfig(Element element) throws ConfigureException;\n"
 "}"
 msgstr ""
+"public interface EvictionConfiguration\n"
+"{\n"
+"   public static final int WAKEUP_DEFAULT = 5;\n"
+"\n"
+"   public static final String ATTR = \"attribute\";\n"
+"   public static final String NAME = \"name\";\n"
+"\n"
+"   public static final String REGION = \"region\";\n"
+"   public static final String WAKEUP_INTERVAL_SECONDS = "
+"\"wakeUpIntervalSeconds\";\n"
+"   public static final String MAX_NODES = \"maxNodes\";\n"
+"   public static final String TIME_TO_IDLE_SECONDS = \"timeToIdleSeconds\";\n"
+"   public static final String TIME_TO_LIVE_SECONDS = \"timeToLiveSeconds\";\n"
+"   public static final String MAX_AGE_SECONDS = \"maxAgeSeconds\";\n"
+"   public static final String MIN_NODES = \"minNodes\";\n"
+"   public static final String REGION_POLICY_CLASS = \"policyClass\";\n"
+"\n"
+"   /**\n"
+"    * Parse the XML configuration for the given specific eviction region.\n"
+"    * &lt;p/&gt;\n"
+"    * The element parameter should contain the entire region block. An "
+"example\n"
+"    * of an entire Element of the region would be:\n"
+"    * &lt;p/&gt;\n"
+"    * &lt;region name=\"abc\"&gt;\n"
+"    * &lt;attribute name=\"maxNodes\"&gt;10&lt;/attribute&gt;\n"
+"    * &lt;/region&gt;\n"
+"    *\n"
+"    * @param element DOM element for the region. &lt;region name=\"abc\"&gt;"
+"&lt;/region&gt;\n"
+"    * @throws ConfigureException\n"
+"    */\n"
+"   public void parseXMLConfig(Element element) throws ConfigureException;\n"
+"}"
 
 #. Tag: emphasis
 #: Eviction_policies.xml:38 Eviction_policies.xml:60 Eviction_policies.xml:71
 #: Eviction_policies.xml:82
 #, no-c-format
 msgid "Note that:"
-msgstr ""
+msgstr "请注意:"
 
 #. Tag: para
 #: Eviction_policies.xml:42
@@ -298,7 +482,7 @@
 "The EvictionConfiguration class 'parseXMLConfig(Element)' method expects "
 "only the DOM element pertaining to the region the policy is being configured "
 "for."
-msgstr ""
+msgstr "EvictionConfiguration 类的 'parseXMLConfig(Element)' 方法只需要和该策略所配置的 region 相关的 DOM 元素。"
 
 #. Tag: para
 #: Eviction_policies.xml:49
@@ -308,7 +492,7 @@
 "methods for configured properties pertaining to the policy used on a given "
 "cache region. (e.g. for LRUConfiguration there is a int getMaxNodes() and a "
 "setMaxNodes(int))"
-msgstr ""
+msgstr "EvictionConfiguration 实现应该为给定缓存 region 使用的策略相关的配置属性维护 getter 和 setter 方法。(例如,对于 LRUConfiguration 来说是 int getMaxNodes() 和 setMaxNodes(int))"
 
 #. Tag: para
 #: Eviction_policies.xml:54
@@ -321,6 +505,8 @@
 "implementing SortedEvictionQueue takes care of most of the common "
 "functionality available in a set of eviction policy provider classes"
 msgstr ""
+"此外,新的逐出策略提供者的实现可以通过继承 BaseEvictionPolicy 和"
+"BaseEvictionAlgorithm 来进一步简化。或者,对于正确排序的 EvictionAlgorithms(按照逐出顺序 - 请参考 LFUAlgorithm)来说,继承 BaseSortedEvictionAlgorithm 和实现 SortedEvictionQueue 考虑了一系列逐出策略提供者类里大多数公用的功能。"
 
 #. Tag: programlisting
 #: Eviction_policies.xml:57
@@ -393,6 +579,72 @@
 "\n"
 "}"
 msgstr ""
+"public abstract class BaseEvictionPolicy implements EvictionPolicy\n"
+"{\n"
+"   protected static final Fqn ROOT = new Fqn(\"/\");\n"
+"\n"
+"   protected TreeCache cache_;\n"
+"\n"
+"   public BaseEvictionPolicy()\n"
+"   {\n"
+"   }\n"
+"\n"
+"   /** EvictionPolicy interface implementation */\n"
+"\n"
+"   /**\n"
+"    * Evict the node under given Fqn from cache.\n"
+"    *\n"
+"    * @param fqn The fqn of a node in cache.\n"
+"    * @throws Exception\n"
+"    */\n"
+"   public void evict(Fqn fqn) throws Exception\n"
+"   {\n"
+"      cache_.evict(fqn);\n"
+"   }\n"
+"\n"
+"   /**\n"
+"    * Return a set of child names under a given Fqn.\n"
+"    *\n"
+"    * @param fqn Get child names for given Fqn in cache.\n"
+"    * @return Set of children name as Objects\n"
+"    */\n"
+"   public Set getChildrenNames(Fqn fqn)\n"
+"   {\n"
+"      try\n"
+"      {\n"
+"         return cache_.getChildrenNames(fqn);\n"
+"      }\n"
+"      catch (CacheException e)\n"
+"      {\n"
+"         e.printStackTrace();\n"
+"      }\n"
+"      return null;\n"
+"   }\n"
+"\n"
+"   public boolean hasChild(Fqn fqn)\n"
+"   {\n"
+"      return cache_.hasChild(fqn);\n"
+"   }\n"
+"\n"
+"   public Object getCacheData(Fqn fqn, Object key)\n"
+"   {\n"
+"      try\n"
+"      {\n"
+"         return cache_.get(fqn, key);\n"
+"      }\n"
+"      catch (CacheException e)\n"
+"      {\n"
+"         e.printStackTrace();\n"
+"      }\n"
+"      return null;\n"
+"   }\n"
+"\n"
+"   public void configure(TreeCache cache)\n"
+"   {\n"
+"      this.cache_ = cache;\n"
+"   }\n"
+"\n"
+"}"
 
 #. Tag: programlisting
 #: Eviction_policies.xml:58
@@ -776,6 +1028,383 @@
 "\n"
 "}"
 msgstr ""
+"public abstract class BaseEvictionAlgorithm implements EvictionAlgorithm\n"
+"{\n"
+"   private static final Log log = LogFactory.getLog(BaseEvictionAlgorithm."
+"class);\n"
+"\n"
+"   protected Region region;\n"
+"   protected BoundedBuffer recycleQueue;\n"
+"   protected EvictionQueue evictionQueue;\n"
+"\n"
+"   /**\n"
+"    * This method will create an EvictionQueue implementation and prepare it "
+"for use.\n"
+"    *\n"
+"    * @param region Region to setup an eviction queue for.\n"
+"    * @return The created EvictionQueue to be used as the eviction queue for "
+"this algorithm.\n"
+"    * @throws EvictionException\n"
+"    * @see EvictionQueue\n"
+"    */\n"
+"   protected abstract EvictionQueue setupEvictionQueue(Region region) throws "
+"EvictionException;\n"
+"\n"
+"   /**\n"
+"    * This method will check whether the given node should be evicted or "
+"not.\n"
+"    *\n"
+"    * @param ne NodeEntry to test eviction for.\n"
+"    * @return True if the given node should be evicted. False if the given "
+"node should not \n"
+"    * be evicted.\n"
+"    */\n"
+"   protected abstract boolean shouldEvictNode(NodeEntry ne);\n"
+"\n"
+"   protected BaseEvictionAlgorithm()\n"
+"   {\n"
+"      recycleQueue = new BoundedBuffer();\n"
+"   }\n"
+"\n"
+"   protected void initialize(Region region) throws EvictionException\n"
+"   {\n"
+"      this.region = region;\n"
+"      evictionQueue = setupEvictionQueue(region);\n"
+"   }\n"
+"\n"
+"   /**\n"
+"    * Process the given region.\n"
+"    * &lt;p/&gt;\n"
+"    * Eviction Processing encompasses the following:\n"
+"    * &lt;p/&gt;\n"
+"    * - Add/Remove/Visit Nodes\n"
+"    * - Prune according to Eviction Algorithm\n"
+"    * - Empty/Retry the recycle queue of previously evicted but locked "
+"(during actual \n"
+"    * cache eviction) \n"
+"    *nodes.\n"
+"    *\n"
+"    * @param region Cache region to process for eviction.\n"
+"    * @throws EvictionException\n"
+"    */\n"
+"   public void process(Region region) throws EvictionException\n"
+"   {\n"
+"      if (this.region == null)\n"
+"      {\n"
+"         this.initialize(region);\n"
+"      }\n"
+"\n"
+"      this.processQueues(region);\n"
+"      this.emptyRecycleQueue();\n"
+"      this.prune();\n"
+"   }\n"
+"\n"
+"   public void resetEvictionQueue(Region region)\n"
+"   {\n"
+"   }\n"
+"\n"
+"   /**\n"
+"    * Get the underlying EvictionQueue implementation.\n"
+"    *\n"
+"    * @return the EvictionQueue used by this algorithm\n"
+"    * @see EvictionQueue\n"
+"    */\n"
+"   public EvictionQueue getEvictionQueue()\n"
+"   {\n"
+"      return this.evictionQueue;\n"
+"   }\n"
+"\n"
+"   /**\n"
+"    * Event processing for Evict/Add/Visiting of nodes.\n"
+"    * &lt;p/&gt;\n"
+"    * - On AddEvents a new element is added into the eviction queue\n"
+"    * - On RemoveEvents, the removed element is removed from the eviction "
+"queue.\n"
+"    * - On VisitEvents, the visited node has its eviction statistics updated "
+"(idleTime, \n"
+"    * numberOfNodeVisists, etc..)\n"
+"    *\n"
+"    * @param region Cache region to process for eviction.\n"
+"    * @throws EvictionException\n"
+"    */\n"
+"   protected void processQueues(Region region) throws EvictionException\n"
+"   {\n"
+"      EvictedEventNode node;\n"
+"      int count = 0;\n"
+"      while ((node = region.takeLastEventNode()) != null)\n"
+"      {\n"
+"         int eventType = node.getEvent();\n"
+"         Fqn fqn = node.getFqn();\n"
+"\n"
+"         count++;\n"
+"         switch (eventType)\n"
+"         {\n"
+"            case EvictedEventNode.ADD_EVENT:\n"
+"               this.processAddedNodes(fqn);\n"
+"               break;\n"
+"            case EvictedEventNode.REMOVE_EVENT:\n"
+"               this.processRemovedNodes(fqn);\n"
+"               break;\n"
+"            case EvictedEventNode.VISIT_EVENT:\n"
+"               this.processVisitedNodes(fqn);\n"
+"               break;\n"
+"            default:\n"
+"               throw new RuntimeException(\"Illegal Eviction Event type \" + "
+"eventType);\n"
+"         }\n"
+"      }\n"
+"\n"
+"      if (log.isTraceEnabled())\n"
+"      {\n"
+"         log.trace(\"processed \" + count + \" node events\");\n"
+"      }\n"
+"\n"
+"   }\n"
+"\n"
+"   protected void evict(NodeEntry ne)\n"
+"   {\n"
+"//      NodeEntry ne = evictionQueue.getNodeEntry(fqn);\n"
+"      if (ne != null)\n"
+"      {\n"
+"         evictionQueue.removeNodeEntry(ne);\n"
+"         if (!this.evictCacheNode(ne.getFqn()))\n"
+"         {\n"
+"            try\n"
+"            {\n"
+"               recycleQueue.put(ne);\n"
+"            }\n"
+"            catch (InterruptedException e)\n"
+"            {\n"
+"               e.printStackTrace();\n"
+"            }\n"
+"         }\n"
+"      }\n"
+"   }\n"
+"\n"
+"   /**\n"
+"    * Evict a node from cache.\n"
+"    *\n"
+"    * @param fqn node corresponds to this fqn\n"
+"    * @return True if successful\n"
+"    */\n"
+"   protected boolean evictCacheNode(Fqn fqn)\n"
+"   {\n"
+"      if (log.isTraceEnabled())\n"
+"      {\n"
+"         log.trace(\"Attempting to evict cache node with fqn of \" + fqn);\n"
+"      }\n"
+"      EvictionPolicy policy = region.getEvictionPolicy();\n"
+"      // Do an eviction of this node\n"
+"\n"
+"      try\n"
+"      {\n"
+"         policy.evict(fqn);\n"
+"      }\n"
+"      catch (Exception e)\n"
+"      {\n"
+"         if (e instanceof TimeoutException)\n"
+"         {\n"
+"            log.warn(\"eviction of \" + fqn + \" timed out. Will retry later."
+"\");\n"
+"            return false;\n"
+"         }\n"
+"         e.printStackTrace();\n"
+"         return false;\n"
+"      }\n"
+"\n"
+"      if (log.isTraceEnabled())\n"
+"      {\n"
+"         log.trace(\"Eviction of cache node with fqn of \" + fqn + \" "
+"successful\");\n"
+"      }\n"
+"\n"
+"      return true;\n"
+"   }\n"
+"\n"
+"   /**\n"
+"    * Process an Added cache node.\n"
+"    *\n"
+"    * @param fqn FQN of the added node.\n"
+"    * @throws EvictionException\n"
+"    */\n"
+"   protected void processAddedNodes(Fqn fqn) throws EvictionException\n"
+"   {\n"
+"      if (log.isTraceEnabled())\n"
+"      {\n"
+"         log.trace(\"Adding node \" + fqn + \" to eviction queue\");\n"
+"      }\n"
+"\n"
+"      long stamp = System.currentTimeMillis();\n"
+"      NodeEntry ne = new NodeEntry(fqn);\n"
+"      ne.setModifiedTimeStamp(stamp);\n"
+"      ne.setNumberOfNodeVisits(1);\n"
+"      // add it to the node map and eviction queue\n"
+"      if (evictionQueue.containsNodeEntry(ne))\n"
+"      {\n"
+"         if (log.isTraceEnabled())\n"
+"         {\n"
+"            log.trace(\"Queue already contains \" + ne.getFqn() + \" "
+"processing it as visited\");\n"
+"         }\n"
+"         this.processVisitedNodes(ne.getFqn());\n"
+"         return;\n"
+"      }\n"
+"\n"
+"      evictionQueue.addNodeEntry(ne);\n"
+"\n"
+"      if (log.isTraceEnabled())\n"
+"      {\n"
+"         log.trace(ne.getFqn() + \" added successfully to eviction queue"
+"\");\n"
+"      }\n"
+"   }\n"
+"\n"
+"   /**\n"
+"    * Remove a node from cache.\n"
+"    * \n"
+"    * This method will remove the node from the eviction queue as well as\n"
+"    * evict the node from cache.\n"
+"    * \n"
+"    * If a node cannot be removed from cache, this method will remove it "
+"from the\n"
+"    * eviction queue and place the element into the recycleQueue. Each node "
+"in the recycle \n"
+"    * queue will get retried until proper cache eviction has taken place.\n"
+"    * \n"
+"    * Because EvictionQueues are collections, when iterating them from an "
+"iterator, use \n"
+"    * iterator.remove() to avoid ConcurrentModificationExceptions. Use the "
+"boolean \n"
+"    * parameter to indicate the calling context.\n"
+"    *\n"
+"    * @param fqn FQN of the removed node\n"
+"    * @throws EvictionException\n"
+"    */\n"
+"   protected void processRemovedNodes(Fqn fqn) throws EvictionException\n"
+"   {\n"
+"      if (log.isTraceEnabled())\n"
+"      {\n"
+"         log.trace(\"Removing node \" + fqn + \" from eviction queue and "
+"attempting eviction\");\n"
+"      }\n"
+"\n"
+"      NodeEntry ne = evictionQueue.getNodeEntry(fqn);\n"
+"      if (ne != null)\n"
+"      {\n"
+"         evictionQueue.removeNodeEntry(ne);\n"
+"      }\n"
+"\n"
+"      if (log.isTraceEnabled())\n"
+"      {\n"
+"         log.trace(fqn + \" removed from eviction queue\");\n"
+"      }\n"
+"   }\n"
+"\n"
+"   /**\n"
+"    * Visit a node in cache.\n"
+"    * &lt;p/&gt;\n"
+"    * This method will update the numVisits and modifiedTimestamp properties "
+"of the Node.\n"
+"    * These properties are used as statistics to determine eviction (LRU, "
+"LFU, MRU, etc..)\n"
+"    * &lt;p/&gt;\n"
+"    * *Note* that this method updates Node Entries by reference and does not "
+"put them back\n"
+"    * into the queue. For some sorted collections, a remove, and a re-add is "
+"required to\n"
+"    * maintain the sorted order of the elements.\n"
+"    *\n"
+"    * @param fqn FQN of the visited node.\n"
+"    * @throws EvictionException\n"
+"    */\n"
+"   protected void processVisitedNodes(Fqn fqn) throws EvictionException\n"
+"   {\n"
+"      NodeEntry ne = evictionQueue.getNodeEntry(fqn);\n"
+"      if (ne == null)\n"
+"      {\n"
+"         this.processAddedNodes(fqn);\n"
+"         return;\n"
+"      }\n"
+"      // note this method will visit and modify the node statistics by "
+"reference!\n"
+"      // if a collection is only guaranteed sort order by adding to the "
+"collection,\n"
+"      // this implementation will not guarantee sort order.\n"
+"      ne.setNumberOfNodeVisits(ne.getNumberOfNodeVisits() + 1);\n"
+"      ne.setModifiedTimeStamp(System.currentTimeMillis());\n"
+"   }\n"
+"\n"
+"   /**\n"
+"    * Empty the Recycle Queue.\n"
+"    * &lt;p/&gt;\n"
+"    * This method will go through the recycle queue and retry to evict the "
+"nodes from cache.\n"
+"    *\n"
+"    * @throws EvictionException\n"
+"    */\n"
+"   protected void emptyRecycleQueue() throws EvictionException\n"
+"   {\n"
+"      while (true)\n"
+"      {\n"
+"         Fqn fqn;\n"
+"\n"
+"         try\n"
+"         {\n"
+"            fqn = (Fqn) recycleQueue.poll(0);\n"
+"         }\n"
+"         catch (InterruptedException e)\n"
+"         {\n"
+"            e.printStackTrace();\n"
+"            break;\n"
+"         }\n"
+"\n"
+"         if (fqn == null)\n"
+"         {\n"
+"            if (log.isTraceEnabled())\n"
+"            {\n"
+"               log.trace(\"Recycle queue is empty\");\n"
+"            }\n"
+"            break;\n"
+"         }\n"
+"\n"
+"         if (log.isTraceEnabled())\n"
+"         {\n"
+"            log.trace(\"emptying recycle bin. Evict node \" + fqn);\n"
+"         }\n"
+"\n"
+"         // Still doesn't work\n"
+"         if (!evictCacheNode(fqn))\n"
+"         {\n"
+"            try\n"
+"            {\n"
+"               recycleQueue.put(fqn);\n"
+"            }\n"
+"            catch (InterruptedException e)\n"
+"            {\n"
+"               e.printStackTrace();\n"
+"            }\n"
+"            break;\n"
+"         }\n"
+"      }\n"
+"   }\n"
+"\n"
+"   protected void prune() throws EvictionException\n"
+"   {\n"
+"      NodeEntry entry;\n"
+"      while ((entry = evictionQueue.getFirstNodeEntry()) != null)\n"
+"      {\n"
+"         if (this.shouldEvictNode(entry))\n"
+"         {\n"
+"            this.evict(entry);\n"
+"         }\n"
+"         else\n"
+"         {\n"
+"            break;\n"
+"         }\n"
+"      }\n"
+"   }\n"
+"\n"
+"}"
 
 #. Tag: para
 #: Eviction_policies.xml:64
@@ -788,7 +1417,7 @@
 "because of held locks. That list is pruned. Finally, the EvictionQueue "
 "itself is pruned for entries that should be evicted based upon the "
 "configured eviction rules for the region."
-msgstr ""
+msgstr "BaseEvictionAlgorithm 类保持了一个处理结构。它将首先处理根据 region 排队的 ADD、REMOVE 和 VISIT 事件(从 EvictionTreeCacheListener 发起)。它也会维护一个因为锁而没有正确逐出的节点集合。这个列表会被删除。最后,EvictionQueue 也会删除那些根据为该 region 配置的逐出规则应该被逐出的条目。"
 
 #. Tag: programlisting
 #: Eviction_policies.xml:69
@@ -883,6 +1512,94 @@
 "\n"
 "   }"
 msgstr ""
+"public abstract class BaseSortedEvictionAlgorithm extends "
+"BaseEvictionAlgorithm \n"
+"   implements EvictionAlgorithm\n"
+"   {\n"
+"      private static final Log log = LogFactory.getLog"
+"(BaseSortedEvictionAlgorithm.class);\n"
+"\n"
+"      public void process(Region region) throws EvictionException\n"
+"      {\n"
+"         super.process(region);\n"
+"      }\n"
+"\n"
+"      protected void processQueues(Region region) throws EvictionException\n"
+"      {\n"
+"         boolean evictionNodesModified = false;\n"
+"\n"
+"         EvictedEventNode node;\n"
+"         int count = 0;\n"
+"         while ((node = region.takeLastEventNode()) != null)\n"
+"         {\n"
+"            int eventType = node.getEvent();\n"
+"            Fqn fqn = node.getFqn();\n"
+"\n"
+"            count++;\n"
+"            switch (eventType)\n"
+"            {\n"
+"               case EvictedEventNode.ADD_EVENT:\n"
+"                  this.processAddedNodes(fqn);\n"
+"                  evictionNodesModified = true;\n"
+"                  break;\n"
+"               case EvictedEventNode.REMOVE_EVENT:\n"
+"                  this.processRemovedNodes(fqn);\n"
+"                  break;\n"
+"               case EvictedEventNode.VISIT_EVENT:\n"
+"                  this.processVisitedNodes(fqn);\n"
+"                  evictionNodesModified = true;\n"
+"                  break;\n"
+"               default:\n"
+"                  throw new RuntimeException(\"Illegal Eviction Event type "
+"\" + eventType);\n"
+"            }\n"
+"         }\n"
+"\n"
+"         if (log.isTraceEnabled())\n"
+"         {\n"
+"            log.trace(\"Eviction nodes visited or added requires resort of "
+"queue \" +\n"
+"            evictionNodesModified);\n"
+"         }\n"
+"\n"
+"         this.resortEvictionQueue(evictionNodesModified);\n"
+"\n"
+"\n"
+"         if (log.isTraceEnabled())\n"
+"         {\n"
+"            log.trace(\"processed \" + count + \" node events\");\n"
+"         }\n"
+"\n"
+"      }\n"
+"\n"
+"      /**\n"
+"       * This method is called to resort the queue after add or visit events "
+"have occurred.\n"
+"       * \n"
+"       * If the parameter is true, the queue needs to be resorted. If it is "
+"false, the queue \n"
+"       * does not need resorting.\n"
+"       *\n"
+"       * @param evictionQueueModified True if the queue was added to or "
+"visisted during event \n"
+"       * processing.\n"
+"       */\n"
+"      protected void resortEvictionQueue(boolean evictionQueueModified)\n"
+"      {\n"
+"         long begin = System.currentTimeMillis();\n"
+"         ((SortedEvictionQueue) evictionQueue).resortEvictionQueue();\n"
+"         long end = System.currentTimeMillis();\n"
+"\n"
+"         if (log.isTraceEnabled())\n"
+"         {\n"
+"            long diff = end - begin;\n"
+"            log.trace(\"Took \" + diff + \"ms to sort queue with \" + "
+"getEvictionQueue().size()\n"
+"            + \" elements\");\n"
+"         }\n"
+"      }\n"
+"\n"
+"   }"
 
 #. Tag: para
 #: Eviction_policies.xml:75
@@ -893,7 +1610,7 @@
 "visited. This allows the Algorithm to determine whether to resort the "
 "eviction queue items (in first to evict order) or to skip the potentially "
 "expensive sorting if there have been no changes to the cache in this region."
-msgstr ""
+msgstr "BaseSortedEvictionAlgorithm 类将维护一个布尔值来决定是否添加或访问任何新的节点。它通过算法来决定是否对逐出队列里的条目进行重新排序(按照 first to evict 顺序),或者如果该 region 里的缓存没有变动则可能跳过排序过程。"
 
 #. Tag: programlisting
 #: Eviction_policies.xml:80
@@ -907,6 +1624,13 @@
 "   public void resortEvictionQueue();\n"
 "}"
 msgstr ""
+"public interface SortedEvictionQueue extends EvictionQueue\n"
+"{\n"
+"   /**\n"
+"    * Provide contract to resort a sorted queue.\n"
+"    */\n"
+"   public void resortEvictionQueue();\n"
+"}"
 
 #. Tag: para
 #: Eviction_policies.xml:86
@@ -919,12 +1643,14 @@
 "in the queue. The last entry in the queue should be the last entry that will "
 "require eviction."
 msgstr ""
+"SortedEvictionQueue 接口定义了对底层队列重新排序的 BaseSortedEvictionAlgorithm abstract 类所使用的规范。队列排序应该首先以 first to "
+"evict 顺序进行。列表里的第一个条目应该在最后一个条目之前逐出。队列里的最后一个条目应该是需要逐出的最后的条目。"
 
 #. Tag: title
 #: Eviction_policies.xml:94
 #, no-c-format
 msgid "TreeCache Eviction Policy Configuration"
-msgstr ""
+msgstr "TreeCache 逐出策略的配置"
 
 #. Tag: para
 #: Eviction_policies.xml:95
@@ -935,7 +1661,7 @@
 "can define its own eviction policy provider or it can use the eviction "
 "policy provider class defined at the cache level (1.2.x backwards "
 "compatibility)"
-msgstr ""
+msgstr "TreeCache 1.2.X 允许为所有的 region 配置同一个逐出策略提供者类。从 TreeCache 1.3.x 开始,每个缓存 region 都可以定义自己的逐出策略提供者类,或者可以使用按缓存级别(向后兼容 1.2.x)定义的逐出策略提供者类。"
 
 #. Tag: para
 #: Eviction_policies.xml:98
@@ -943,7 +1669,7 @@
 msgid ""
 "Here is an example of a legacy 1.2.x EvictionPolicyConfig element to "
 "configure TreeCache for use with a single eviction policy provider"
-msgstr ""
+msgstr "下面是一个配置 TreeCache 使用单个逐出策略提供者类的旧的 1.2.x EvictionPolicyConfig 元素的例子。"
 
 #. Tag: programlisting
 #: Eviction_policies.xml:101
@@ -992,13 +1718,54 @@
 "             &lt;/config&gt;\n"
 "          &lt;/attribute&gt;"
 msgstr ""
+"&lt;attribute name=\"EvictionPolicyClass\"&gt;org.jboss.cache.eviction."
+"LRUPolicy&lt;/attribute&gt;\n"
+"          &lt;!-- Specific eviction policy configurations. This is LRU --"
+"&gt;\n"
+"          &lt;attribute name=\"EvictionPolicyConfig\"&gt;\n"
+"             &lt;config&gt;\n"
+"                &lt;attribute name=\"wakeUpIntervalSeconds\"&gt;5&lt;/"
+"attribute&gt;\n"
+"                &lt;!-- Cache wide default --&gt;\n"
+"                &lt;region name=\"/_default_\"&gt;\n"
+"                    &lt;attribute name=\"maxNodes\"&gt;5000&lt;/"
+"attribute&gt;\n"
+"                    &lt;attribute name=\"timeToLiveSeconds\"&gt;1000&lt;/"
+"attribute&gt;\n"
+"                &lt;/region&gt;\n"
+"                &lt;region name=\"/org/jboss/data\"&gt;\n"
+"                    &lt;attribute name=\"maxNodes\"&gt;5000&lt;/"
+"attribute&gt;\n"
+"                    &lt;attribute name=\"timeToLiveSeconds\"&gt;1000&lt;/"
+"attribute&gt;\n"
+"                &lt;/region&gt;\n"
+"                &lt;region name=\"/org/jboss/test/data\"&gt;\n"
+"                    &lt;attribute name=\"maxNodes\"&gt;5&lt;/attribute&gt;\n"
+"                    &lt;attribute name=\"timeToLiveSeconds\"&gt;4&lt;/"
+"attribute&gt;\n"
+"                &lt;/region&gt;\n"
+"                &lt;region name=\"/test/\"&gt;\n"
+"                    &lt;attribute name=\"maxNodes\"&gt;10000&lt;/"
+"attribute&gt;\n"
+"                    &lt;attribute name=\"timeToLiveSeconds\"&gt;5&lt;/"
+"attribute&gt;\n"
+"                &lt;/region&gt;\n"
+"                &lt;region name=\"/maxAgeTest/\"&gt;\n"
+"                   &lt;attribute name=\"maxNodes\"&gt;10000&lt;/"
+"attribute&gt;\n"
+"                   &lt;attribute name=\"timeToLiveSeconds\"&gt;8&lt;/"
+"attribute&gt;\n"
+"                   &lt;attribute name=\"maxAgeSeconds\"&gt;10&lt;/"
+"attribute&gt;\n"
+"                &lt;/region&gt;\n"
+"             &lt;/config&gt;\n"
+"          &lt;/attribute&gt;"
 
 #. Tag: para
 #: Eviction_policies.xml:102
 #, no-c-format
-msgid ""
-"Here is an example of configuring a different eviction provider per region"
-msgstr ""
+msgid "Here is an example of configuring a different eviction provider per region"
+msgstr "根据 region 配置不同的逐出提供者的例子"
 
 #. Tag: programlisting
 #: Eviction_policies.xml:105
@@ -1038,15 +1805,49 @@
 "         &lt;/config&gt;\n"
 "      &lt;/attribute&gt;"
 msgstr ""
+"&lt;attribute name=\"EvictionPolicyConfig\"&gt;\n"
+"         &lt;config&gt;\n"
+"            &lt;attribute name=\"wakeUpIntervalSeconds\"&gt;5&lt;/"
+"attribute&gt;\n"
+"            &lt;!-- Cache wide default --&gt;\n"
+"            &lt;region name=\"/_default_\" policyClass=\"org.jboss.cache."
+"eviction.LRUPolicy\"&gt;\n"
+"               &lt;attribute name=\"maxNodes\"&gt;5000&lt;/attribute&gt;\n"
+"               &lt;attribute name=\"timeToLiveSeconds\"&gt;1000&lt;/"
+"attribute&gt;\n"
+"            &lt;/region&gt;\n"
+"            &lt;region name=\"/org/jboss/data\" policyClass=\"org.jboss."
+"cache.eviction.LFUPolicy\"&gt;\n"
+"               &lt;attribute name=\"maxNodes\"&gt;5000&lt;/attribute&gt;\n"
+"               &lt;attribute name=\"minNodes\"&gt;1000&lt;/attribute&gt;\n"
+"            &lt;/region&gt;\n"
+"            &lt;region name=\"/org/jboss/test/data\"\n"
+"                policyClass=\"org.jboss.cache.eviction.FIFOPolicy\"&gt;\n"
+"               &lt;attribute name=\"maxNodes\"&gt;5&lt;/attribute&gt;\n"
+"            &lt;/region&gt;\n"
+"            &lt;region name=\"/test/\" policyClass=\"org.jboss.cache."
+"eviction.MRUPolicy\"&gt;\n"
+"               &lt;attribute name=\"maxNodes\"&gt;10000&lt;/attribute&gt;\n"
+"            &lt;/region&gt;\n"
+"            &lt;region name=\"/maxAgeTest/\" policyClass=\"org.jboss.cache."
+"eviction.LRUPolicy\"&gt;\n"
+"               &lt;attribute name=\"maxNodes\"&gt;10000&lt;/attribute&gt;\n"
+"               &lt;attribute name=\"timeToLiveSeconds\"&gt;8&lt;/"
+"attribute&gt;\n"
+"               &lt;attribute name=\"maxAgeSeconds\"&gt;10&lt;/attribute&gt;\n"
+"            &lt;/region&gt;\n"
+"         &lt;/config&gt;\n"
+"      &lt;/attribute&gt;"
 
 #. Tag: para
 #: Eviction_policies.xml:106
 #, no-c-format
+#, fuzzy
 msgid ""
 "Lastly, an example of mixed mode. In this scenario the regions that have a "
 "specific policy defined will use that policy. Those that do not will default "
 "to the policy defined on the entire cache instance."
-msgstr ""
+msgstr "最后一个混合模式的例子。"
 
 #. Tag: programlisting
 #: Eviction_policies.xml:109
@@ -1281,3 +2082,4 @@
 "cache is pruned down to the 10 most frequently used nodes when the eviction "
 "timer makes a pass through the eviction algorithm."
 msgstr ""
+

Modified: projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/State_transfer.po
===================================================================
--- projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/State_transfer.po	2008-09-20 07:31:45 UTC (rev 78726)
+++ projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/State_transfer.po	2008-09-20 08:24:45 UTC (rev 78727)
@@ -9,8 +9,8 @@
 "Project-Id-Version: State_transfer\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-16 16:08+1000\n"
-"Last-Translator: Xi HUANG <xhuang at redhat.com>\n"
+"PO-Revision-Date: 2008-09-19 22:02+1000\n"
+"Last-Translator: \n"
 "Language-Team:  <en at li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -122,7 +122,7 @@
 "transfer. This approach somewhat reduces the burden on the cache instance "
 "providing state, but increases the load on the persistent store on the "
 "recipient side.)"
-msgstr ""
+msgstr "如果使用了 write-through 缓存加载器,持久性状态将完全代表当前的缓存状态。数据可能已经从内存状态里逐出,但它将仍然位于持久性存储里。在这种情况下,如果缓存加载器不是共享的,持久性状态转移被用来确保新缓存具有正确的状态。如果希望有一个“热(hot)”缓存(但缓存开始提供服务时,在内存里具有所有相关数据),内存状态也可以转移。(请注意,\"CacheLoaderPreload\" 配置参数也可以被用来提供 \"warm\" 或 \"hot\" 的缓存而不需要进行内存状态转移。这个方法减轻了提供状态的缓存实例的负担,但增加了接收端的持久性存储的负载。)"
 
 #. Tag: para
 #: State_transfer.xml:50
@@ -133,7 +133,7 @@
 "and persistent (i.e. passivated) states. Therefore an in-memory state "
 "transfer is necesssary. A persistent state transfer is necessary if the "
 "cache loader is not shared."
-msgstr ""
+msgstr "如果使用了带钝化的缓存加载器,那只有合并内存状态(也就是非钝化状态)和持久性状态(也就是已钝化状态)才能获得完整状态。因此,内存状态的转移是必需的。如果缓存加载器不是共享的,那么持久性状态的转移是必需的。"
 
 #. Tag: para
 #: State_transfer.xml:55
@@ -143,7 +143,7 @@
 "one that is used to cache data that can also be found in a persistent store, "
 "e.g. a database), whether or not in-memory state should be transferred "
 "depends on whether or not a \"hot\" cache is desired."
-msgstr ""
+msgstr "如果没有使用缓存加载器且缓存只是一个 write-aside 缓存(例如,用来缓存只有在持久性存储如数据库里找到的数据的缓存),内存状态是否应该转移取决于是否需要一个“热”缓存。"
 
 #. Tag: title
 #: State_transfer.xml:63
@@ -222,6 +222,8 @@
 "responds with no state, state is requested from each instance one by one "
 "until one provides state or all instances have been queried."
 msgstr ""
+"部分状态转移在激活 region 后进行。只有使用基于 region 的 marshalling 时才相关。这里是一个为树的一部分进行状态散集(unmarshal)所需的特殊类加载器。直到应用程序在缓存里注册这个类加载器,状态转移才会成功。一旦应用程序在缓存里注册了这个类加载器,它会调用 <literal>activateRegion"
+"(String fqn)</literal>。作为 region 激活过程的一部分,相关子树状态的部分状态转移将被执行。状态请求将发至群集里最老的缓存实例;如果这个实例回应无状态,那么将逐个地遍历所有实例直至某个实例提供状态或者是查询遍了所有的实例。"
 
 #. Tag: para
 #: State_transfer.xml:95
@@ -232,6 +234,8 @@
 "literal>. This suppresses initial state transfer, which would fail due to "
 "the inability to deserialize the transferred state."
 msgstr ""
+"通常,当使用了基于 region 的列集,缓存的 <literal>InactiveOnStartup</literal> 属性将被设置为 <literal>true</"
+"literal>。这会禁止初始的状态转移,这是由于缺乏对转移的状态进行解序列化的能力。"
 
 #. Tag: para
 #: State_transfer.xml:100
@@ -246,7 +250,7 @@
 "transfer, which are based on a \"pull\" approach (i.e. recipient asks for "
 "and receives state). However, the process of preparing and integrating the "
 "state is the same."
-msgstr ""
+msgstr "Buddy 复制。当使用 Buddy 复制时,初始状态转移将被禁用。相反,当一个缓存实例加入到这个群集时,它将成为一个或多个其他的实例的 buddy,同时那些实例也成为它的 buddy。每当实例决定是否有一个新 buddy 为其提供备份时,它将把自己的当前状态“推(push)”给新的 buddy。状态的这种“推”和基于“拉(pull)”的其他形式的状态转移(如,接收者请求并接收状态)有少许不同。然而,状态的准备(preparing)和集成(integrating)过程仍是一样的。"
 
 #. Tag: para
 #: State_transfer.xml:103
@@ -258,6 +262,9 @@
 "buddies only occurs when the application calls <literal>activateRegion"
 "(String fqn)</literal> on the various members of the group."
 msgstr ""
+"只有 <literal>InactiveOnStartup</literal> 属性为 <literal>false</"
+"literal> 时,状态的“推”才会发生。如果它为 <literal>true</literal>,buddy 间的状态转移只在应用程序对组的不同成员调用 <literal>activateRegion"
+"(String fqn)</literal> 时才会发生。"
 
 #. Tag: para
 #: State_transfer.xml:106
@@ -269,5 +276,5 @@
 "instances until one responds, with buddy replication the instance that is "
 "activating a region will request partial state from each instance for which "
 "it is serving as a backup."
-msgstr ""
+msgstr "<literal>activateRegion()</literal> 调用之后的部分状态转移和 buddy 复制也有稍许不同。和从一个缓存实例请求部分状态并尝试所有实例直至有实例应答不同,使用 buddy 复制时,激活 region 的实例将从作为备份的每个实例中请求部分状态。"
 

Modified: projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Treecache_marshaller.po
===================================================================
--- projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Treecache_marshaller.po	2008-09-20 07:31:45 UTC (rev 78726)
+++ projects/docs/enterprise/4.3/Cache/Cache_Tree_Cache_Guide/zh-CN/Treecache_marshaller.po	2008-09-20 08:24:45 UTC (rev 78727)
@@ -1,24 +1,26 @@
+# translation of Treecache_marshaller.po to
 # Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 # Automatically generated, 2007.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: Treecache_marshaller\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n"
 "POT-Creation-Date: 2008-05-30 04:03+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-09-20 00:09+1000\n"
+"Last-Translator: \n"
+"Language-Team:  <en at li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
 
 #. Tag: title
 #: Treecache_marshaller.xml:10
 #, no-c-format
 msgid "TreeCacheMarshaller"
-msgstr ""
+msgstr "TreeCacheMarshaller"
 
 #. Tag: para
 #: Treecache_marshaller.xml:11
@@ -30,10 +32,13 @@
 "mechanism to marshall and unmarshall data called the "
 "<literal>TreeCacheMarshaller</literal>."
 msgstr ""
+"当远程缓存相互通信并组织数据时,JBoss Cache 不使用标准的 Java 序列化机制来序列化 <literal>java."
+"lang.reflect.Method</literal> 对象及其参数,而使用自己的机制来列集和散集数据:<literal>TreeCacheMarshaller</literal>。"
 
 #. Tag: para
 #: Treecache_marshaller.xml:14
 #, no-c-format
+#, fuzzy
 msgid ""
 "In addition to providing the performance and efficiency enhancements over "
 "standard Java serialization, The <literal>TreeCacheMarshaller</literal> also "
@@ -46,7 +51,7 @@
 "to use different classloaders on a per-region basis by allowing application "
 "code to register a classloader that should be used to handle replication for "
 "a portion of the tree."
-msgstr ""
+msgstr "除了提供比标准的 Java 序列化更好的性能和效率外,<literal>TreeCacheMarshaller</literal> 也提供另外一个功能。为了对从对象进行解序列化"
 
 #. Tag: title
 #: Treecache_marshaller.xml:18
@@ -132,8 +137,7 @@
 #. Tag: programlisting
 #: Treecache_marshaller.xml:26
 #, no-c-format
-msgid ""
-"&lt;attribute name=\"UseRegionBasedMarshalling\"&gt;true&lt;/attribute&gt;"
+msgid "&lt;attribute name=\"UseRegionBasedMarshalling\"&gt;true&lt;/attribute&gt;"
 msgstr ""
 
 #. Tag: para
@@ -224,8 +228,7 @@
 #. Tag: para
 #: Treecache_marshaller.xml:60
 #, no-c-format
-msgid ""
-"Replication to B fails, as the required classloader is not yet registered."
+msgid "Replication to B fails, as the required classloader is not yet registered."
 msgstr ""
 
 #. Tag: para
@@ -706,3 +709,4 @@
 "&lt;!-- takes values such as 1.2.3, 1.2.4 and 1.3.0 --&gt;\n"
 "&lt;attribute name=\"ReplicationVersion\"&gt;1.2.4&lt;/attribute&gt;"
 msgstr ""
+




More information about the jboss-cvs-commits mailing list