#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
msgid ""
msgstr ""
"Project-Id-Version: Apache Traffic Server 4.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-11-08 17:57+0900\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"

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:2
msgid "Coupled Statistics"
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:21
msgid ""
"Use coupled statistics for quantities that are related and therefore must "
"be updated jointly."
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:24
msgid ""
"As a very simple example, suppose you have three statistics: ``sum``, "
"``part_1``, and ``part_2``. They must always preserve the relationship that "
"``sum = part_1  + part_2``. If you update ``part_1`` without updating "
"``sum`` at the same time, then the equation becomes untrue. Therefore, the "
"statistics are said to be *coupled*."
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:30
msgid ""
"The mechanism for updating coupled statistics jointly is to create local "
"copies of global coupled statistics in the routines that modifiy them. When "
"each local copy is updated appropriately, do a global update using "
"``TSStatsCoupledUpdate``. To specify which statistics are related to one "
"another, establish a coupled statistic category and make sure that each "
"coupled statistic belongs to the appropriate category. When it is time to "
"do the global update, specify the category to be updated."
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:40
msgid ""
"The local statistic copy must have a duplicate set of statistics as that of "
"the master copy. Local statistics must also be added to the local statistic "
"category in the same order as their master copy counterparts were "
"originally added."
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:45
msgid ""
"Below are the steps you need to follow, along with a code example taken "
"from the ``redirect-1.c`` sample plugin."
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:49
msgid "To add coupled statistics:"
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:51
msgid ""
"Declare the global category for your coupled statistics as a global "
"``TSCoupledStat`` variable in your plugin."
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:54
msgid ""
"Declare your coupled statistics as global ``TSStat`` variables in your "
"plugin."
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:57
msgid ""
"In ``TSPluginInit``, create a new global coupled category using "
"``TSStatCoupledGlobalCategoryCreate``."
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:60
msgid ""
"In ``TSPluginInit``, create new global coupled statistics using "
"``TSStatCoupledGlobalAdd``. When you create a new statistic, you need to "
"give it an \"external\" name that the Traffic Server command line interface "
"(Traffic Line) uses to access the statistic."
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:65
msgid ""
"In any routine wherein you want to modify (increment, decrement, or other "
"modification) your coupled statistics, declare local copies of the coupled "
"category and coupled statistics."
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:69
msgid ""
"Create local copies using ``TSStatCoupledLocalCopyCreate`` and "
"``TSStatCoupledLocalAdd``."
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:72
msgid ""
"Modify the local copies of your statistics. Then call "
"``TSStatsCoupledUpdate`` to update the global copies jointly."
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:75
msgid ""
"When you are finished, you must destroy all of the local copies in the "
"category via ``TSStatCoupledLocalCopyDestroy``."
msgstr ""

#: ../../sdk/adding-statistics/coupled-statistics.en.rst:79
msgid "Example Using the redirect-1.c Sample Plugin"
msgstr ""
