<commit_before>/*
 * (C) Copyright 2013 Kurento (http://kurento.org/)
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser General Public License
 * (LGPL) version 2.1 which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/lgpl-2.1.html
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 */
package com.kurento.kmf.content;

/**
 * Configuration parameters for Content Management API.
 * 
 * @author <NAME> (<EMAIL>)
 * @author <NAME> (<EMAIL>)
 * @version 1.0.0
 */
public class ContentApiConfiguration {

	// Default values

	/**
	 * Minimal size of the thread pool executing callbacks on content Handlers
	 * (e.g. {@link HttpPlayerHander}, {@HttpRecorderHandler
	 * 
	 * 
	 * }, and so on). These threads will be kept in the
	 * pool, even if they are idle.
	 */
	private int poolCoreSize = 10;

	/**
	 * Maximum number of threads to allow in the thread pool.
	 */
	private int poolMaxSize = 100;

	/**
	 * Timeout (in milliseconds) that a Hanlder callback thread will wait before
	 * canceling the request and throwing and exception.
	 */
	private long poolExecutionTimeout = 50000L;

	/**
	 * Size of the queue used for holding tasks before they are executed in the
	 * thread pool.
	 */
	private int poolMaxQueueSize = 100;

	/**
	 * Timeout in milliseconds until a connection is established in the
	 * Streaming Proxy.
	 */
	private int proxyConnectionTimeout = 10000;

	/**
	 * Timeout for waiting for data or, put differently, a maximum period
	 * inactivity between two consecutive data packets. A timeout value of zero
	 * is interpreted as an infinite timeout.
	 */
	private int proxySocketTimeout = 0;

	/**
	 * Maximum total connections in Streaming Proxy.
	 */
	private int proxyMaxConnections = 1000;

	/**
	 * Maximum total connections in Streaming Proxy per route. In the context of
	 * the Streming Proxy, A 'route' is defined as the protocol (HTTP/HTTPS) +
	 * host + port.
	 */
	private int proxyMaxConnectionsPerRoute = 20;

	/**
	 * Timeout (in milliseconds) for Poll operation for WebRTC events.
	 */
	private long webRtcEventQueuePollTimeout = 15000L;

	/**
	 * Setter (mutator) for poolCoreSize field.
	 * 
	 * @param poolCoreSize
	 *            Minimal size of the Thread pool executing callbacks on content
	 *            Handlers. Default: 10
	 */
	public void setPoolCoreSize(int poolCoreSize) {
		this.poolCoreSize = poolCoreSize;
	}

	/**
	 * Setter (mutator) for poolExecutionTimeout field.
	 * <commit_msg>[kmf-content-api] Reduced default poll timeout for WebRTC<commit_after>/*
 * (C) Copyright 2013 Kurento (http://kurento.org/)
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser General Public License
 * (LGPL) version 2.1 which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/lgpl-2.1.html
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 */
package com.kurento.kmf.content;

/**
 * Configuration parameters for Content Management API.
 * 
 * @author <NAME> (<EMAIL>)
 * @author <NAME> (<EMAIL>)
 * @version 1.0.0
 */
public class ContentApiConfiguration {

	// Default values

	/**
	 * Minimal size of the thread pool executing callbacks on content Handlers
	 * (e.g. {@link HttpPlayerHander}, {@HttpRecorderHandler
	 * 
	 * 
	 * }, and so on). These threads will be kept in the
	 * pool, even if they are idle.
	 */
	private int poolCoreSize = 10;

	/**
	 * Maximum number of threads to allow in the thread pool.
	 */
	private int poolMaxSize = 100;

	/**
	 * Timeout (in milliseconds) that a Hanlder callback thread will wait before
	 * canceling the request and throwing and exception.
	 */
	private long poolExecutionTimeout = 50000L;

	/**
	 * Size of the queue used for holding tasks before they are executed in the
	 * thread pool.
	 */
	private int poolMaxQueueSize = 100;

	/**
	 * Timeout in milliseconds until a connection is established in the
	 * Streaming Proxy.
	 */
	private int proxyConnectionTimeout = 10000;

	/**
	 * Timeout for waiting for data or, put differently, a maximum period
	 * inactivity between two consecutive data packets. A timeout value of zero
	 * is interpreted as an infinite timeout.
	 */
	private int proxySocketTimeout = 0;

	/**
	 * Maximum total connections in Streaming Proxy.
	 */
	private int proxyMaxConnections = 1000;

	/**
	 * Maximum total connections in Streaming Proxy per route. In the context of
	 * the Streming Proxy, A 'route' is defined as the protocol (HTTP/HTTPS) +
	 * host + port.
	 */
	private int proxyMaxConnectionsPerRoute = 20;

	/**
	 * Timeout (in milliseconds) for Poll operation for WebRTC events.
	 */
	private long webRtcEventQueuePollTimeout = 5000L;

	/**
	 * Setter (mutator) for poolCoreSize field.
	 * 
	 * @param poolCoreSize
	 *            Minimal size of the Thread pool executing callbacks on content
	 *            Handlers. Default: 10
	 */
	public void setPoolCoreSize(int poolCoreSize) {
		this.poolCoreSize = poolCoreSize;
	}

	/**
	 * Setter (mutator) for poolExecutionTimeout field.
	 * 
{'fraction_non_alphanumeric': 0.0856885688568857, 'fraction_numerical': 0.0153015301530153, 'mean_word_length': 3.3372365339578454, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2408463', 'n_tokens_mistral': 1695, 'n_tokens_neox': 1484, 'n_words': 650}