亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? balancer.php

?? java的php集成工具
?? PHP
?? 第 1 頁 / 共 2 頁
字號:
<?php/** * @copyright Copyright 2007 Conduit Internet Technologies, Inc. (http://conduit-it.com) * @license Apache Licence, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) * * Licensed 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. * * @package Apache * @subpackage Solr * @author Donovan Jimenez <djimenez@conduit-it.com> */require_once('Apache/Solr/Service.php');/** * Reference Implementation for using multiple Solr services in a distribution. Functionality * includes: * 	routing of read / write operations * 	failover (on selection) for multiple read servers */class Apache_Solr_Service_Balancer{	protected $_createDocuments = true;	protected $_readableServices = array();	protected $_writeableServices = array();	protected $_currentReadService = null;	protected $_currentWriteService = null;	protected $_readPingTimeout = 1;	protected $_writePingTimeout = 1;	/**	 * Escape a value for special query characters such as ':', '(', ')', '*', '?', etc.	 *	 * NOTE: inside a phrase fewer characters need escaped, use {@link Apache_Solr_Service::escapePhrase()} instead	 *	 * @param string $value	 * @return string	 */	static public function escape($value)	{		return Apache_Solr_Service::escape($value);	}	/**	 * Escape a value meant to be contained in a phrase for special query characters	 *	 * @param string $value	 * @return string	 */	static public function escapePhrase($value)	{		return Apache_Solr_Service::escapePhrase($value);	}	/**	 * Convenience function for creating phrase syntax from a value	 *	 * @param string $value	 * @return string	 */	static public function phrase($value)	{		return Apache_Solr_Service::phrase($value);	}	/**	 * Constructor. Takes arrays of read and write service instances or descriptions	 *	 * @param array $readableServices	 * @param array $writeableServices	 */	public function __construct($readableServices = array(), $writeableServices = array())	{		//setup readable services		foreach ($readableServices as $service)		{			$this->addReadService($service);		}		//setup writeable services		foreach ($writeableServices as $service)		{			$this->addWriteService($service);		}	}	public function setReadPingTimeout($timeout)	{		$this->_readPingTimeout = $timeout;	}	public function setWritePingTimetou($timeout)	{		$this->_writePingTimeout = $timeout;	}	/**	 * Generates a service ID	 *	 * @param string $host	 * @param integer $port	 * @param string $path	 * @return string	 */	private function _getServiceId($host, $port, $path)	{		return $host . ':' . $port . $path;	}	/**	 * Adds a service instance or service descriptor (if it is already	 * not added)	 *	 * @param mixed $service	 *	 * @throws Exception If service descriptor is not valid	 */	public function addReadService($service)	{		if ($service instanceof Apache_Solr_Service)		{			$id = $this->_getServiceId($service->getHost(), $service->getPort(), $service->getPath());			$this->_readableServices[$id] = $service;		}		else if (is_array($service))		{			if (isset($service['host']) && isset($service['port']) && isset($service['path']))			{				$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);				$this->_readableServices[$id] = $service;			}			else			{				throw new Exception('A Readable Service description array does not have all required elements of host, port, and path');			}		}	}	/**	 * Removes a service instance or descriptor from the available services	 *	 * @param mixed $service	 *	 * @throws Exception If service descriptor is not valid	 */	public function removeReadService($service)	{		$id = '';		if ($service instanceof Apache_Solr_Service)		{			$id = $this->_getServiceId($service->getHost(), $service->getPort(), $service->getPath());		}		else if (is_array($service))		{			if (isset($service['host']) && isset($service['port']) && isset($service['path']))			{				$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);			}			else			{				throw new Exception('A Readable Service description array does not have all required elements of host, port, and path');			}		}		if ($id)		{			unset($this->_readableServices[$id]);		}	}	/**	 * Adds a service instance or service descriptor (if it is already	 * not added)	 *	 * @param mixed $service	 *	 * @throws Exception If service descriptor is not valid	 */	public function addWriteService($service)	{		if ($service instanceof Apache_Solr_Service)		{			$id = $this->_getServiceId($service->getHost(), $service->getPort(), $service->getPath());			$this->_writeableServices[$id] = $service;		}		else if (is_array($service))		{			if (isset($service['host']) && isset($service['port']) && isset($service['path']))			{				$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);				$this->_writeableServices[$id] = $service;			}			else			{				throw new Exception('A Writeable Service description array does not have all required elements of host, port, and path');			}		}	}	/**	 * Removes a service instance or descriptor from the available services	 *	 * @param mixed $service	 *	 * @throws Exception If service descriptor is not valid	 */	public function removeWriteService($service)	{		$id = '';		if ($service instanceof Apache_Solr_Service)		{			$id = $this->_getServiceId($service->getHost(), $service->getPort(), $service->getPath());		}		else if (is_array($service))		{			if (isset($service['host']) && isset($service['port']) && isset($service['path']))			{				$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);			}			else			{				throw new Exception('A Readable Service description array does not have all required elements of host, port, and path');			}		}		if ($id)		{			unset($this->_writeableServices[$id]);		}	}	/**	 * Iterate through available read services and select the first with a ping	 * that satisfies configured timeout restrictions (or the default)	 *	 * @return Apache_Solr_Service	 *	 * @throws Exception If there are no read services that meet requirements	 */	private function _selectReadService($forceSelect = false)	{		if (!$this->_currentReadService || !isset($this->_readableServices[$this->_currentReadService]) || $forceSelect)		{			foreach ($this->_readableServices as $id => $service)			{				if (is_array($service))				{					//convert the array definition to a client object					$service = new Apache_Solr_Service($service['host'], $service['port'], $service['path']);					$service->setCreateDocuments($this->_createDocuments);					$this->_readableServices[$id] = $service;				}				//check the service (make sure it pings quickly)				if ($service->ping($this->_readPingTimeout) !== false)				{					$service->setCreateDocuments($this->_createDocuments);					$this->_currentReadService = $id;					return $this->_readableServices[$this->_currentReadService];				}			}			throw new Exception('No read services were available');		}		return $this->_readableServices[$this->_currentReadService];	}	/**	 * Iterate through available write services and select the first with a ping	 * that satisfies configured timeout restrictions (or the default)	 *	 * @return Apache_Solr_Service	 *	 * @throws Exception If there are no write services that meet requirements	 */	private function _selectWriteService($forceSelect = false)	{		if (!$this->_currentWriteService || !isset($this->_writeableServices[$this->_currentWriteService]) || $forceSelect)		{			foreach ($this->_writeableServices as $id => $service)			{				if (is_array($service))				{					//convert the array definition to a client object					$service = new Apache_Solr_Service($service['host'], $service['port'], $service['path']);					$this->_writeableServices[$id] = $service;				}				//check the service				if ($service->ping($this->_writePingTimeout) !== false)				{					$this->_currentWriteService = $id;					return $this->_writeableServices[$this->_currentWriteService];				}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国女主播一区二区三区| 亚洲美女屁股眼交3| 日本不卡免费在线视频| 欧美日韩国产精选| 天堂在线亚洲视频| 日韩一级欧美一级| 国产高清一区日本| 亚洲精品中文字幕乱码三区| 欧美日韩卡一卡二| 免播放器亚洲一区| 国产精品视频九色porn| 91麻豆精东视频| 日韩不卡一区二区三区| 国产欧美日韩不卡| 欧美亚洲另类激情小说| 久国产精品韩国三级视频| 国产视频一区不卡| 欧美亚洲动漫制服丝袜| 麻豆精品国产91久久久久久| 国产精品美女久久久久高潮| 欧美私模裸体表演在线观看| 精品一区二区三区在线视频| 亚洲啪啪综合av一区二区三区| 69久久夜色精品国产69蝌蚪网| 国产精品一区二区三区网站| 一区二区三区在线影院| 欧美成人免费网站| 色吊一区二区三区| 国产伦精品一区二区三区免费| 亚洲乱码国产乱码精品精的特点| 欧美精品日日鲁夜夜添| 国产·精品毛片| 天天综合天天做天天综合| 久久精品视频免费观看| 欧洲亚洲国产日韩| 懂色av中文一区二区三区| 亚洲3atv精品一区二区三区| 欧美韩国日本不卡| 日韩欧美国产综合| 在线观看亚洲专区| 国产成人综合在线| 喷水一区二区三区| 一区二区三区四区高清精品免费观看| 久久综合色之久久综合| 欧美日韩精品欧美日韩精品一 | 国产精品一二三四五| 亚洲一区二区黄色| 中文字幕在线一区免费| 日韩精品在线网站| 欧美日韩亚洲另类| 一本色道综合亚洲| 国产成人免费视频| 久久av中文字幕片| 日本欧美肥老太交大片| 亚洲免费在线视频一区 二区| 2021国产精品久久精品| 欧美一区二区三区在线看| 91高清视频在线| 成人短视频下载| 日韩久久久久久| 久久 天天综合| 免费高清不卡av| 天天色综合天天| 亚洲成人av福利| 夜夜嗨av一区二区三区| 国产精品久久久久久亚洲毛片| 久久伊人中文字幕| 日韩欧美一区中文| 91精品国产欧美一区二区成人 | 国产精品一区二区黑丝| 日本亚洲三级在线| 蜜臀久久99精品久久久画质超高清 | 国产精品免费视频一区| 欧美激情中文字幕一区二区| 国产清纯白嫩初高生在线观看91 | 国产一区 二区 三区一级| 麻豆成人免费电影| 国内精品免费**视频| 精品中文字幕一区二区小辣椒| 美女一区二区在线观看| 强制捆绑调教一区二区| 另类调教123区| 精品无码三级在线观看视频| 精品午夜一区二区三区在线观看| 国产美女主播视频一区| 粉嫩高潮美女一区二区三区 | 欧美视频一区二区三区| 欧美日韩国产高清一区二区 | 国产精品午夜久久| 亚洲人妖av一区二区| 一区二区高清免费观看影视大全| 一区二区三区四区不卡在线| 丝袜亚洲另类丝袜在线| 麻豆久久久久久| 国产99一区视频免费| 91网站在线播放| 在线电影院国产精品| 欧美成人一区二区三区在线观看| 国产亚洲污的网站| 悠悠色在线精品| 麻豆精品一区二区av白丝在线| 国产精品77777竹菊影视小说| 成人免费av资源| 欧美亚洲动漫制服丝袜| 精品久久久久久久久久久院品网 | 六月丁香婷婷色狠狠久久| 国产精品自拍一区| 91视视频在线观看入口直接观看www| 色狠狠色狠狠综合| 精品国产免费一区二区三区香蕉 | 欧美精品一区视频| 亚洲日本在线a| 久久精品国产999大香线蕉| 成人理论电影网| 欧美一区二区视频观看视频| 国产精品美女久久久久aⅴ国产馆| 一区二区三区在线观看动漫| 久久99日本精品| 色婷婷av一区二区三区软件| 精品88久久久久88久久久| 一区二区三区电影在线播| 精品制服美女丁香| 欧美亚洲尤物久久| 成人黄色在线视频| 高清成人免费视频| 国产精品传媒入口麻豆| 亚洲午夜私人影院| 欧美亚洲尤物久久| 欧美日本在线观看| 18成人在线观看| 成人激情文学综合网| 欧美午夜不卡视频| 精品欧美黑人一区二区三区| 一色桃子久久精品亚洲| 精品国产乱码久久久久久老虎 | 亚洲免费电影在线| 激情综合五月婷婷| 欧美中文字幕不卡| 国产精品第13页| 久国产精品韩国三级视频| 精品视频999| 亚洲男人天堂av| 懂色av中文字幕一区二区三区| 日韩精品专区在线影院重磅| 五月婷婷激情综合网| 色8久久人人97超碰香蕉987| 国产精品久久久久aaaa| 激情图区综合网| 欧美一级久久久| 性久久久久久久久久久久| 欧美自拍偷拍一区| 亚洲日本一区二区| av成人老司机| 国产欧美一区二区三区沐欲| 国产在线视频一区二区| 日韩一卡二卡三卡| 蜜桃传媒麻豆第一区在线观看| 欧美日韩成人综合天天影院| 玉足女爽爽91| 色老头久久综合| 亚洲精品高清在线| 色综合久久88色综合天天 | 亚洲一线二线三线视频| 色综合一区二区三区| 青青草原综合久久大伊人精品| 色香蕉久久蜜桃| 亚洲欧美日韩电影| 欧美亚洲尤物久久| 亚洲aaa精品| 日韩亚洲欧美成人一区| 久久爱www久久做| 久久麻豆一区二区| 成人毛片视频在线观看| 中文字幕在线不卡一区二区三区| youjizz国产精品| 自拍偷拍亚洲欧美日韩| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 一级中文字幕一区二区| 91福利精品第一导航| 亚洲综合激情网| 69成人精品免费视频| 久久9热精品视频| 国产清纯白嫩初高生在线观看91 | 亚洲精品久久久蜜桃| 日本韩国欧美三级| 日韩精品免费专区| 精品播放一区二区| 成人午夜看片网址| 亚洲综合色婷婷| 日韩欧美国产综合| 国产精品自拍av| 亚洲精品乱码久久久久久日本蜜臀| 欧亚一区二区三区| 毛片不卡一区二区| 久久精品亚洲一区二区三区浴池| 波多野结衣在线一区| 亚洲国产综合色| 亚洲精品在线观看视频| gogo大胆日本视频一区| 日韩专区在线视频|