<commit_before>/**
 * 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.
 */
package org.apache.camel.component.infinispan;

import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import org.apache.camel.RuntimeCamelException;
import org.apache.camel.spi.UriParam;
import org.apache.camel.spi.UriParams;
import org.infinispan.commons.api.BasicCacheContainer;
import org.infinispan.context.Flag;

@UriParams
public class InfinispanConfiguration implements Cloneable {
    @UriParam
    private String hosts;
    @UriParam(label = "producer", defaultValue = "PUT")
    private InfinispanOperation operation = InfinispanOperation.PUT;
    @Deprecated
    @UriParam(label = "consumer", defaultValue = "PUT")
    private String command = "PUT";
    @UriParam(label = "consumer", defaultValue = "true")
    private boolean sync = true;
    @UriParam(label = "consumer", javaType = "java.lang.String")
    private Set<String> eventTypes;
    @UriParam(label = "consumer")
    private InfinispanCustomListener customListener;
    @UriParam(label = "consumer", defaultValue = "false")
    private boolean clusteredListener;
    @UriParam
    private InfinispanQueryBuilder queryBuilder;
    @UriParam(label = "advanced", javaType = "java.lang.String")
    private Flag[] flags;
    @UriParam(label = "advanced")
    private String configurationUri;
    @UriParam(label = "advanced")
    private Map<String, String> configurationProperties;
    @UriParam(label = "advanced")
    private BasicCacheContainer cacheContainer;
    @UriParam(label = "advanced")
    private Object cacheContainerConfiguration;
    @UriParam(label = "advanced")
    private Object resultHeader;

    public String getCommand() {
        return operation.toString();
    }

    /**
     * @deprecated @see @{link setOperation}
     *
     * The operation to perform.
     */
    public void setCommand(String command) {
        if (command.startsWith(InfinispanConstants.OPERATION)) {
            command = command.substring(InfinispanConstants.OPERATION.length()).toUpperCase();
        }

       setOperation(InfinispanOperation.valueOf(command));
    }

    public InfinispanOperation getOperation() {
        return operation;
    }

    /**
     * The operation to perform.
     */
    public void setOperation(InfinispanOperation operation) {
        this.operation = operation;
    }<commit_msg>Fix CS<commit_after>/**
 * 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.
 */
package org.apache.camel.component.infinispan;

import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import org.apache.camel.RuntimeCamelException;
import org.apache.camel.spi.UriParam;
import org.apache.camel.spi.UriParams;
import org.infinispan.commons.api.BasicCacheContainer;
import org.infinispan.context.Flag;

@UriParams
public class InfinispanConfiguration implements Cloneable {
    @UriParam
    private String hosts;
    @UriParam(label = "producer", defaultValue = "PUT")
    private InfinispanOperation operation = InfinispanOperation.PUT;
    @Deprecated
    @UriParam(label = "consumer", defaultValue = "PUT")
    private String command = "PUT";
    @UriParam(label = "consumer", defaultValue = "true")
    private boolean sync = true;
    @UriParam(label = "consumer", javaType = "java.lang.String")
    private Set<String> eventTypes;
    @UriParam(label = "consumer")
    private InfinispanCustomListener customListener;
    @UriParam(label = "consumer", defaultValue = "false")
    private boolean clusteredListener;
    @UriParam
    private InfinispanQueryBuilder queryBuilder;
    @UriParam(label = "advanced", javaType = "java.lang.String")
    private Flag[] flags;
    @UriParam(label = "advanced")
    private String configurationUri;
    @UriParam(label = "advanced")
    private Map<String, String> configurationProperties;
    @UriParam(label = "advanced")
    private BasicCacheContainer cacheContainer;
    @UriParam(label = "advanced")
    private Object cacheContainerConfiguration;
    @UriParam(label = "advanced")
    private Object resultHeader;

    public String getCommand() {
        return operation.toString();
    }

    /**
     * The operation to perform.
     *
     * @deprecated replaced by @{link setOperation}
     */
    public void setCommand(String command) {
        if (command.startsWith(InfinispanConstants.OPERATION)) {
            command = command.substring(InfinispanConstants.OPERATION.length()).toUpperCase();
        }

        setOperation(InfinispanOperation.valueOf(command));
    }

    public InfinispanOperation getOperation() {
        return operation;
    }

    /**
     * The operation to perform.
     */
    public void setOperation(InfinispanOperation operation) {
        this.operation = operation;
    }
{'fraction_non_alphanumeric': 0.0929976396538159, 'fraction_numerical': 0.0012588512981904013, 'mean_word_length': 3.786144578313253, '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': '6445877', 'n_tokens_mistral': 1726, 'n_tokens_neox': 1686, 'n_words': 528}