@Override public IdentifiedDataSerializable createNew(Integer arg) { return new ExecutorConfig(); } };
@Override public IdentifiedDataSerializable createNew(Integer arg) { return new ExecutorConfig(); } };
private void handleExecutor(Node node) throws Exception { ExecutorConfig executorConfig = new ExecutorConfig(); handleViaReflection(node, config, executorConfig); }
private void handleExecutor(Node node) throws Exception { ExecutorConfig executorConfig = new ExecutorConfig(); handleViaReflection(node, config, executorConfig); }
@Override protected IdentifiedDataSerializable getConfig() { ExecutorConfig config = new ExecutorConfig(parameters.name, parameters.poolSize); config.setQueueCapacity(parameters.queueCapacity); config.setStatisticsEnabled(parameters.statisticsEnabled); return config; }
@Override protected IdentifiedDataSerializable getConfig() { ExecutorConfig config = new ExecutorConfig(parameters.name, parameters.poolSize); config.setQueueCapacity(parameters.queueCapacity); config.setStatisticsEnabled(parameters.statisticsEnabled); return config; }
/** * Starts the test application. * <p> * Loads the config from classpath hazelcast.xml, if it fails to load, will use default config. */ public static void main(String[] args) throws Exception { Config config; try { config = new FileSystemXmlConfig("hazelcast.xml"); } catch (FileNotFoundException e) { config = new Config(); } for (int i = 1; i <= LOAD_EXECUTORS_COUNT; i++) { config.addExecutorConfig(new ExecutorConfig(EXECUTOR_NAMESPACE + " " + i).setPoolSize(i)); } ConsoleApp consoleApp = new ConsoleApp(Hazelcast.newHazelcastInstance(config)); consoleApp.start(); } }
/** * Starts the test application. * <p> * Loads the config from classpath hazelcast.xml, if it fails to load, will use default config. */ public static void main(String[] args) throws Exception { Config config; try { config = new FileSystemXmlConfig("hazelcast.xml"); } catch (FileNotFoundException e) { config = new Config(); } for (int i = 1; i <= LOAD_EXECUTORS_COUNT; i++) { config.addExecutorConfig(new ExecutorConfig(EXECUTOR_NAMESPACE + " " + i).setPoolSize(i)); } ConsoleApp consoleApp = new ConsoleApp(Hazelcast.newHazelcastInstance(config)); consoleApp.start(); } }
private static Config createConfiguration() { Config config = new Config(); NetworkConfig networkCfg = createNetworkConfigs(); config.setNetworkConfig(networkCfg); ExecutorConfig executorConfig = new ExecutorConfig(); executorConfig.setPoolSize(MAX_POOL_SIZE); executorConfig.setStatisticsEnabled(false); config.addExecutorConfig(executorConfig); return config; }
.addExecutorConfig(new ExecutorConfig() .setName(taskDistributorName) .setPoolSize(1)