<commit_before>package brooklyn.entity.nosql.gemfire

import brooklyn.entity.Effector
import brooklyn.entity.Entity
import brooklyn.entity.ParameterType
import brooklyn.entity.basic.BasicParameterType
import brooklyn.entity.basic.EffectorWithExplicitImplementation
import brooklyn.entity.basic.SoftwareProcessEntity
import brooklyn.entity.basic.lifecycle.legacy.SshBasedAppSetup
import brooklyn.event.adapter.legacy.OldHttpSensorAdapter
import brooklyn.event.adapter.legacy.ValueProvider
import brooklyn.event.basic.BasicAttributeSensor
import brooklyn.event.basic.BasicConfigKey
import brooklyn.location.PortRange
import brooklyn.location.basic.SshMachineLocation

import com.google.common.base.Charsets
import com.google.common.base.Splitter

class GemfireServer extends SoftwareProcessEntity {

    public static final BasicConfigKey<String> INSTALL_DIR = [ String, "gemfire.server.installDir", "Gemfire installation directory" ]
    public static final BasicConfigKey<String> SUGGESTED_API_JAR = [ String, "gemfire.server.apiJar", "Jar containing Gemfire installation" ]
    public static final BasicConfigKey<File> CONFIG_FILE = [ File, "gemfire.server.configFile", "Gemfire configuration file" ]
    public static final BasicConfigKey<File> JAR_FILE = [ File, "gemfire.server.jarFile", "Gemfire jar file" ]
    public static final BasicConfigKey<PortRange> SUGGESTED_HUB_PORT = [ PortRange, "gemfire.server.suggestedHubPort", "Gemfire gateway hub port", 11111 ]
    public static final BasicConfigKey<File> LICENSE = [ File, "gemfire.server.license", "Gemfire license file" ]
    public static final BasicConfigKey<PortRange> WEB_CONTROLLER_PORT = [ PortRange, "gemfire.server.controllerWebPort", "Gemfire controller web port", 8084 ]
    public static final BasicAttributeSensor<Integer> HUB_PORT = [ Integer, "gemfire.server.hubPort", "Gemfire gateway hub port" ]
    public static final BasicAttributeSensor<String> CONTROL_URL = [ String, "gemfire.server.controlUrl", "URL for perfoming management actions" ]
	public static final BasicAttributeSensor<Collection> REGION_LIST = new BasicAttributeSensor<Collection>(Collection.class, "gemfire.server.regions.list", 
		"List of fully-pathed regions on this gemfire server")

    public static final Effector<Void> ADD_GATEWAYS =
        new EffectorWithExplicitImplementation<GemfireServer, Void>("addGateways", Void.TYPE,
            Arrays.<ParameterType<?>>asList(new BasicParameterType<Collection>("gateways", Collection.class, "Gateways to add")),
            "Add gateways to this server, to replicate to/from other clusters") {
        public Void invokeEffector(GemfireServer entity, Map m) {
            entity.addGateways((Collection<GatewayConnectionDetails>) m.get("gateways"))
            return null
        }
    }

	public static final Effector<Void> REMOVE_GATEWAYS =
		new EffectorWithExplicitImplementation<GemfireServer, Void>("removeGateways", Void.TYPE,
			Arrays.<ParameterType<?>>asList(new BasicParameterType<Collection>("gateways", Collection.class, "Gateways to remove")),
			"Remove decomissioned gateways from this server") {
		public Void invokeEffector(GemfireServer entity, Map m) {
			entity.removeGateways((Collection<GatewayConnectionDetails>) m.get("gateways"))
			return null
		}
	}
<commit_msg>Change GemfireServer config types from File to String<commit_after>package brooklyn.entity.nosql.gemfire

import brooklyn.entity.Effector
import brooklyn.entity.Entity
import brooklyn.entity.ParameterType
import brooklyn.entity.basic.BasicParameterType
import brooklyn.entity.basic.EffectorWithExplicitImplementation
import brooklyn.entity.basic.SoftwareProcessEntity
import brooklyn.entity.basic.lifecycle.legacy.SshBasedAppSetup
import brooklyn.event.adapter.legacy.OldHttpSensorAdapter
import brooklyn.event.adapter.legacy.ValueProvider
import brooklyn.event.basic.BasicAttributeSensor
import brooklyn.event.basic.BasicConfigKey
import brooklyn.location.PortRange
import brooklyn.location.basic.SshMachineLocation

import com.google.common.base.Charsets
import com.google.common.base.Splitter

class GemfireServer extends SoftwareProcessEntity {

    public static final BasicConfigKey<String> INSTALL_DIR = [ String, "gemfire.server.installDir", "Gemfire installation directory" ]
    public static final BasicConfigKey<String> SUGGESTED_API_JAR = [ String, "gemfire.server.apiJar", "Jar containing Gemfire installation" ]
    public static final BasicConfigKey<File> CONFIG_FILE = [ String, "gemfire.server.configFile", "Gemfire configuration file" ]
    public static final BasicConfigKey<File> JAR_FILE = [ String, "gemfire.server.jarFile", "Gemfire jar file" ]
    public static final BasicConfigKey<PortRange> SUGGESTED_HUB_PORT = [ PortRange, "gemfire.server.suggestedHubPort", "Gemfire gateway hub port", 11111 ]
    public static final BasicConfigKey<File> LICENSE = [ String, "gemfire.server.license", "Gemfire license file" ]
    public static final BasicConfigKey<PortRange> WEB_CONTROLLER_PORT = [ PortRange, "gemfire.server.controllerWebPort", "Gemfire controller web port", 8084 ]
    public static final BasicAttributeSensor<Integer> HUB_PORT = [ Integer, "gemfire.server.hubPort", "Gemfire gateway hub port" ]
    public static final BasicAttributeSensor<String> CONTROL_URL = [ String, "gemfire.server.controlUrl", "URL for perfoming management actions" ]
	public static final BasicAttributeSensor<Collection> REGION_LIST = new BasicAttributeSensor<Collection>(Collection.class, "gemfire.server.regions.list", 
		"List of fully-pathed regions on this gemfire server")

    public static final Effector<Void> ADD_GATEWAYS =
        new EffectorWithExplicitImplementation<GemfireServer, Void>("addGateways", Void.TYPE,
            Arrays.<ParameterType<?>>asList(new BasicParameterType<Collection>("gateways", Collection.class, "Gateways to add")),
            "Add gateways to this server, to replicate to/from other clusters") {
        public Void invokeEffector(GemfireServer entity, Map m) {
            entity.addGateways((Collection<GatewayConnectionDetails>) m.get("gateways"))
            return null
        }
    }

	public static final Effector<Void> REMOVE_GATEWAYS =
		new EffectorWithExplicitImplementation<GemfireServer, Void>("removeGateways", Void.TYPE,
			Arrays.<ParameterType<?>>asList(new BasicParameterType<Collection>("gateways", Collection.class, "Gateways to remove")),
			"Remove decomissioned gateways from this server") {
		public Void invokeEffector(GemfireServer entity, Map m) {
			entity.removeGateways((Collection<GatewayConnectionDetails>) m.get("gateways"))
			return null
		}
	}

{'fraction_non_alphanumeric': 0.0908816425120773, 'fraction_numerical': 0.002717391304347826, 'mean_word_length': 5.774028629856851, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4671762', 'n_tokens_mistral': 1936, 'n_tokens_neox': 1877, 'n_words': 439}