<commit_before>/*
 * Copyright 2016-2018 shardingsphere.io.
 * <p>
 * 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.
 * </p>
 */

package io.shardingsphere.core.rule;

import io.shardingsphere.core.constant.transaction.ProxyPoolType;
import lombok.Getter;
import lombok.Setter;

/**
 * Data source parameters.
 *
 * @author zhangyonglun
 */
@Getter
@Setter
public final class DataSourceParameter {
    
    public static final String DATA_SOURCE_POOL_CLASS_NAME = "com.zaxxer.hikari.HikariDataSource";
    
    private ProxyPoolType proxyDatasourceType = ProxyPoolType.VENDOR;
    
    private String url;
    
    private String username;
    
    private String password;
    
    private boolean autoCommit;
    
    private long connectionTimeout;
    
    private long idleTimeout;
    
    private long maxLifetime;
    
    private int maximumPoolSize;
}<commit_msg>for #1363 Add Default value for DataSourceParameter.<commit_after>/*
 * Copyright 2016-2018 shardingsphere.io.
 * <p>
 * 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.
 * </p>
 */

package io.shardingsphere.core.rule;

import io.shardingsphere.core.constant.transaction.ProxyPoolType;
import lombok.Getter;
import lombok.Setter;

/**
 * Data source parameters.
 *
 * @author zhangyonglun
 */
@Getter
@Setter
public final class DataSourceParameter {
    
    public static final String DATA_SOURCE_POOL_CLASS_NAME = "com.zaxxer.hikari.HikariDataSource";
    
    private static final long DEFAULT_CONNECTION_TIMEOUT_MILLIS = 30000;
    
    private static final long DEFAULT_IDLE_TIMEOUT_MILLIS = 60000;
    
    private static final long DEFAULT_MAX_LIFE_TIME_MILLIS = 1800000;
    
    private static final int DEFAULT_MAX_POOL_SIZE = 50;
    
    private ProxyPoolType proxyDatasourceType = ProxyPoolType.VENDOR;
    
    private String url;
    
    private String username;
    
    private String password;
    
    private boolean autoCommit;
    
    private long connectionTimeout = DEFAULT_CONNECTION_TIMEOUT_MILLIS;
    
    private long idleTimeout = DEFAULT_IDLE_TIMEOUT_MILLIS;
    
    private long maxLifetime = DEFAULT_MAX_LIFE_TIME_MILLIS;
    
    private int maximumPoolSize = DEFAULT_MAX_POOL_SIZE;
}
{'fraction_non_alphanumeric': 0.06618794879800187, 'fraction_numerical': 0.014673743365594755, 'mean_word_length': 3.5641025641025643, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1697870', 'n_tokens_mistral': 944, 'n_tokens_neox': 922, 'n_words': 308}