# SOME DESCRIPTIVE TITLE.
# Copyright (C) 1999-2020, The Alibaba Group Holding Ltd.
# This file is distributed under the same license as the mars package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: mars 0.8.0a1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-08-05 11:41+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.9.1\n"

#: ../../source/development/oscar/batch.rst:4
msgid "Create and Use Batch Methods"
msgstr "创建和使用批量方法"

#: ../../source/development/oscar/batch.rst:6
msgid ""
"Oscar provides a set of APIs to write batch methods. You can simply add a"
" ``@extensible`` decorator to your actor method and create a batch "
"version.  All calls wrapped in a batch will be sent together, reducing "
"possible RPC cost."
msgstr ""
"Oscar 提供了编写批量方法的一系列 API。你可以向你的 actor 方法添加一个 ``@"
"extensible`` 注解从而创建某个方法的批量化版本。在一次批量调用中执行的所有"
"方法将被一次性提交，减少可能的 RPC 代价。"

#: ../../source/development/oscar/batch.rst:11
msgid "Create a Batch Method"
msgstr "创建批量方法"

#: ../../source/development/oscar/batch.rst:13
msgid "You can create a batch method with a ``@extensible`` decorator:"
msgstr "你可以通过向现有方法添加 ``@extensible`` 装饰器创建批量方法："

#: ../../source/development/oscar/batch.rst:24
msgid ""
"Sometimes we need to process received batch requests. For instance, we "
"need to group requests by certain keys and resent them to different "
"handlers in batches. Oscar supports creating a batch version of the "
"method:"
msgstr ""
"某些情况下我们需要在执行批量方法前对请求进行处理，例如按照一定的关键字对"
"请求进行分组，再批量转发到各个特定的处理方法上。Oscar 支持为方法创建特定"
"的批量版本。"

#: ../../source/development/oscar/batch.rst:43
msgid ""
"In the code above, we simply raises a ``NotImplementedError`` to let the "
"batch version handle all requests. The batch version have two arguments "
"accepting ``args`` and ``kwargs`` of all batched calls as lists. To make "
"argument extraction easier, a utility function ``bind`` is added as an "
"attribute of the method which extracts ``args`` and ``kwargs`` into real "
"arguments."
msgstr ""
"在上面的代码中，我们在原始方法抛出 ``NotImplementedError``，这会使单次"
"方法调用也由批量方法处理。批量方法由两个参数组成，分别代表原始方法输入的 "
"``*args`` 和 ``**kwargs``。为更容易获得批量方法的参数，Oscar 提供了名为 `"
"`bind`` 的工具方法，该方法可从 ``args`` 和 ``kwargs`` 中获得真正调用方法"
"时所使用的参数。"

#: ../../source/development/oscar/batch.rst:50
msgid "Call Batch Methods"
msgstr "调用批量方法"

#: ../../source/development/oscar/batch.rst:52
msgid ""
"Calling batch methods is easy. You can use ``<method_name>.delay`` to "
"make a batched call and use ``<method_name>.batch`` to send them:"
msgstr ""
"调用批量方法很容易，可以通过 ``<method_name>.delay`` 来生成一次调用，再"
"使用 ``<method_name>.batch`` 进行批量提交："

