/** * Create data transfer object for executor configuration. * * @param src Executor configuration. */ public VisorExecutorConfiguration(ExecutorConfiguration src) { name = src.getName(); size = src.getSize(); }
/** * @param cfgs Array of the executors configurations. * @throws IgniteCheckedException If configuration is wrong. */ private static void validateCustomExecutorsConfiguration(ExecutorConfiguration[] cfgs) throws IgniteCheckedException { if (cfgs == null) return; Set<String> names = new HashSet<>(cfgs.length); for (ExecutorConfiguration cfg : cfgs) { if (F.isEmpty(cfg.getName())) throw new IgniteCheckedException("Custom executor name cannot be null or empty."); if (!names.add(cfg.getName())) throw new IgniteCheckedException("Duplicate custom executor name: " + cfg.getName()); if (cfg.getSize() <= 0) throw new IgniteCheckedException("Custom executor size must be positive [name=" + cfg.getName() + ", size=" + cfg.getSize() + ']'); } }
/** * Create data transfer object for executor configuration. * * @param src Executor configuration. */ public VisorExecutorConfiguration(ExecutorConfiguration src) { name = src.getName(); size = src.getSize(); }
/** * @param cfgs Array of the executors configurations. * @throws IgniteCheckedException If configuration is wrong. */ private static void validateCustomExecutorsConfiguration(ExecutorConfiguration[] cfgs) throws IgniteCheckedException { if (cfgs == null) return; Set<String> names = new HashSet<>(cfgs.length); for (ExecutorConfiguration cfg : cfgs) { if (F.isEmpty(cfg.getName())) throw new IgniteCheckedException("Custom executor name cannot be null or empty."); if (!names.add(cfg.getName())) throw new IgniteCheckedException("Duplicate custom executor name: " + cfg.getName()); if (cfg.getSize() <= 0) throw new IgniteCheckedException("Custom executor size must be positive [name=" + cfg.getName() + ", size=" + cfg.getSize() + ']'); } }