亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
中文字幕亚洲欧美在线不卡| 国产一区二区网址| 欧美理论在线播放| 久久国内精品自在自线400部| 欧美无乱码久久久免费午夜一区| 亚洲va韩国va欧美va精品 | 色中色一区二区| 亚洲二区在线视频| 久久新电视剧免费观看| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 美女视频一区二区| 国产精品亲子伦对白| 69堂成人精品免费视频| 成人亚洲精品久久久久软件| 午夜精品一区在线观看| 亚洲国产精品成人综合色在线婷婷| 欧美羞羞免费网站| 男男视频亚洲欧美| 中文字幕亚洲电影| 精品区一区二区| 色婷婷精品久久二区二区蜜臀av| 婷婷开心激情综合| 国产精品乱码久久久久久| 7777精品伊人久久久大香线蕉超级流畅| 国产一区二区三区黄视频 | 欧美老肥妇做.爰bbww视频| 国产成人av一区二区三区在线 | 亚洲图片欧美视频| 国产精品美女视频| 久久蜜桃av一区二区天堂| 精品视频一区二区不卡| 99视频超级精品| 国内精品伊人久久久久av一坑| 99国产精品国产精品毛片| 亚洲天天做日日做天天谢日日欢| 日韩免费福利电影在线观看| 欧美综合一区二区三区| 成人丝袜高跟foot| 精品一区二区三区免费视频| 亚洲成在人线免费| 亚洲欧美激情在线| 欧美经典三级视频一区二区三区| 日韩欧美高清dvd碟片| 欧美久久高跟鞋激| 欧美亚洲动漫精品| 成人一道本在线| 东方欧美亚洲色图在线| 国产原创一区二区| 国产在线观看免费一区| 日韩电影免费一区| 偷拍与自拍一区| 亚洲一级在线观看| 亚洲免费观看在线观看| 国产精品国产三级国产aⅴ无密码| 久久久精品黄色| 久久久亚洲精品石原莉奈| 日韩免费观看2025年上映的电影| 制服丝袜激情欧洲亚洲| 精品视频一区三区九区| 欧美日韩国产一区二区三区地区| 欧美亚洲丝袜传媒另类| 成人高清视频免费观看| 国产精品一区在线观看乱码| 国产精品乡下勾搭老头1| 国产激情视频一区二区三区欧美 | 日本一区二区三区高清不卡 | 亚洲精品国产高清久久伦理二区| 久久久天堂av| 中文天堂在线一区| 亚洲丝袜精品丝袜在线| 亚洲一区在线播放| 日日骚欧美日韩| 国产综合色视频| www.日韩在线| 一本色道久久综合精品竹菊| 欧美系列日韩一区| 日韩三级在线免费观看| 久久综合九色综合欧美就去吻| 久久久久久久综合色一本| 久久综合久久鬼色| 国产欧美日韩视频一区二区 | 久久精品在线观看| 亚洲素人一区二区| 丝袜亚洲另类欧美| 国产精品一级在线| 97国产一区二区| 日本高清免费不卡视频| 9191久久久久久久久久久| 精品欧美黑人一区二区三区| 欧美日韩国产另类一区| 蜜乳av一区二区| 丁香亚洲综合激情啪啪综合| 91首页免费视频| 欧美高清视频在线高清观看mv色露露十八| 日韩欧美一区二区免费| 综合欧美一区二区三区| 日韩中文字幕av电影| 国产精品一二一区| 色妹子一区二区| 欧美大片日本大片免费观看| 国产精品久久久一本精品| 国产精品私人自拍| 日本最新不卡在线| 不卡电影一区二区三区| 欧美绝品在线观看成人午夜影视| 欧美激情资源网| 日韩电影在线一区| 国产精品中文字幕日韩精品| 在线免费精品视频| 26uuu亚洲综合色欧美| 亚洲影视资源网| 国产成人超碰人人澡人人澡| 色综合久久88色综合天天6| 日韩免费视频线观看| 亚洲一区二区三区中文字幕在线| 国产综合久久久久久鬼色 | 蓝色福利精品导航| 欧美色视频在线观看| 综合久久久久久久| 国产aⅴ精品一区二区三区色成熟| 欧美一区二区三区播放老司机| 亚州成人在线电影| 欧美午夜精品一区二区三区| 亚洲视频一区二区免费在线观看| 国产精品888| 国产欧美精品在线观看| 国产真实乱子伦精品视频| 欧美一区二区成人6969| 午夜电影网一区| 欧美亚洲另类激情小说| 中文字幕亚洲视频| 中文字幕成人av| 国产成人在线视频播放| 久久久亚洲高清| 国产a精品视频| 欧美激情一二三区| 成人黄色电影在线| 国产精品久久三| 不卡的av电影在线观看| 亚洲欧洲美洲综合色网| 色综合久久久久综合99| 伊人开心综合网| 欧美日韩精品欧美日韩精品| 偷拍亚洲欧洲综合| 日韩一级免费一区| 国内精品国产成人国产三级粉色 | 久久99国产精品久久99果冻传媒| 日韩视频在线你懂得| 日本va欧美va欧美va精品| 精品国产免费久久| 国产精品亚洲一区二区三区妖精 | 在线观看成人小视频| 午夜欧美大尺度福利影院在线看| 欧美日韩成人综合天天影院| 夜夜嗨av一区二区三区四季av| 欧美亚洲动漫精品| 麻豆视频观看网址久久| 欧美精品一区二区精品网| 国产91色综合久久免费分享| 国产精品国产三级国产普通话99| 色婷婷久久久亚洲一区二区三区 | 国内精品免费**视频| 中文字幕电影一区| 91行情网站电视在线观看高清版| 亚洲bt欧美bt精品| 精品美女在线播放| eeuss鲁片一区二区三区| 亚洲高清免费一级二级三级| 亚洲欧美韩国综合色| 色婷婷香蕉在线一区二区| 美女久久久精品| 亚洲欧洲日韩综合一区二区| 欧美日韩国产首页| 东方欧美亚洲色图在线| 亚洲国产日韩在线一区模特 | 欧美疯狂性受xxxxx喷水图片| 韩国欧美一区二区| 一区二区三区欧美日| 2欧美一区二区三区在线观看视频| 99精品在线免费| 日韩av一二三| 国产精品国产三级国产三级人妇| 欧美日韩国产欧美日美国产精品| 国产一本一道久久香蕉| 亚洲免费观看高清完整版在线观看熊 | 亚洲成人av福利| 国产婷婷精品av在线| 欧美三区在线观看| 国产精品白丝jk白祙喷水网站 | 亚洲激情网站免费观看| 久久综合中文字幕| 欧美在线观看一区| 成人手机在线视频| 琪琪久久久久日韩精品| 国产精品高潮呻吟| 日韩三级高清在线| 欧美三级午夜理伦三级中视频| 国产精品一级黄| 麻豆国产精品官网| 亚洲激情校园春色|