@Test public void testSuportedTypes() throws Exception { ConveyorConfiguration.build("classpath:types.properties"); Conveyor<Integer, String, String> ac = Conveyor.byName("assembling"); assertNotNull(ac); assertTrue(ac instanceof AssemblingConveyor); Conveyor<Integer, String, String> kc = Conveyor.byName("kbalanced"); assertNotNull(kc); assertTrue(kc instanceof KBalancedParallelConveyor); Conveyor<Integer, String, String> lc = Conveyor.byName("lbalanced"); assertNotNull(lc); assertTrue(lc instanceof LBalancedParallelConveyor); Conveyor<Integer, String, String> bc = Conveyor.byName("batch"); assertNotNull(bc); assertTrue(bc instanceof BatchConveyor); Conveyor<Integer, String, String> pc = Conveyor.byName("persistent"); assertNotNull(pc); assertTrue(pc instanceof PersistentConveyor); }
public static void build(String conf, String... moreConf) throws Exception { Objects.requireNonNull(conf, "At least one configuration file must be provided"); processConfFile(conf); if (moreConf != null) { for (String file : moreConf) { processConfFile(file); } } Conveyor<String, String, Conveyor> buildingConveyor = getBuildingConveyor(); Map<String,String> env = System.getenv(); env.forEach((key,value)->{ processPair(buildingConveyor, key, value); }); Properties p = System.getProperties(); p.forEach((key,value)->{ processPair(buildingConveyor, ""+key, ""+value); }); buildingConveyor.part().foreach().label("complete_configuration").value(true).place(); buildingConveyor.completeAndStop().get(); Conveyor.unRegister(buildingConveyor.getName()); }
ConveyorConfiguration { public static void build(String conf, String... moreConf) throws Exception { Objects.requireNonNull(conf, "At least one configuration file must be provided"); processConfFile(conf); if (moreConf != null) { for (String file : moreConf) { processConfFile(file); } } Conveyor<String, String, Conveyor> buildingConveyor = getBuildingConveyor(); Map<String,String> env = System.getenv(); env.forEach((key,value)->{ processPair(buildingConveyor, key, value); }); Properties p = System.getProperties(); p.forEach((key,value)->{ processPair(buildingConveyor, ""+key, ""+value); }); buildingConveyor.part().foreach().label("complete_configuration").value(true).place(); buildingConveyor.completeAndStop().get(); Conveyor.unRegister(buildingConveyor.getName()); } }
ConveyorConfiguration { public static void build(String conf, String... moreConf) throws Exception { Objects.requireNonNull(conf, "At least one configuration file must be provided"); processConfFile(conf); if (moreConf != null) { for (String file : moreConf) { processConfFile(file); } } Conveyor<String, String, Conveyor> buildingConveyor = getBuildingConveyor(); Map<String,String> env = System.getenv(); env.forEach((key,value)->{ processPair(buildingConveyor, key, value); }); Properties p = System.getProperties(); p.forEach((key,value)->{ processPair(buildingConveyor, ""+key, ""+value); }); buildingConveyor.part().foreach().label("complete_configuration").value(true).place(); buildingConveyor.completeAndStop().get(); Conveyor.unRegister(buildingConveyor.getName()); } private  ConveyorConfiguration(); }
ConveyorConfiguration { public static void build(String conf, String... moreConf) throws Exception { Objects.requireNonNull(conf, "At least one configuration file must be provided"); processConfFile(conf); if (moreConf != null) { for (String file : moreConf) { processConfFile(file); } } Conveyor<String, String, Conveyor> buildingConveyor = getBuildingConveyor(); Map<String,String> env = System.getenv(); env.forEach((key,value)->{ processPair(buildingConveyor, key, value); }); Properties p = System.getProperties(); p.forEach((key,value)->{ processPair(buildingConveyor, ""+key, ""+value); }); buildingConveyor.part().foreach().label("complete_configuration").value(true).place(); buildingConveyor.completeAndStop().get(); Conveyor.unRegister(buildingConveyor.getName()); } private  ConveyorConfiguration(); static void build(String conf, String... moreConf); @Override String toString(); }
ConveyorConfiguration { public static void build(String conf, String... moreConf) throws Exception { Objects.requireNonNull(conf, "At least one configuration file must be provided"); processConfFile(conf); if (moreConf != null) { for (String file : moreConf) { processConfFile(file); } } Conveyor<String, String, Conveyor> buildingConveyor = getBuildingConveyor(); Map<String,String> env = System.getenv(); env.forEach((key,value)->{ processPair(buildingConveyor, key, value); }); Properties p = System.getProperties(); p.forEach((key,value)->{ processPair(buildingConveyor, ""+key, ""+value); }); buildingConveyor.part().foreach().label("complete_configuration").value(true).place(); buildingConveyor.completeAndStop().get(); Conveyor.unRegister(buildingConveyor.getName()); } private  ConveyorConfiguration(); static void build(String conf, String... moreConf); @Override String toString(); static String SCRIPT_ENGINE; static String PROPERTY_PREFIX; static String PERSISTENCE_PREFIX; static String PROPERTY_DELIMITER; static long DEFAULT_TIMEOUT_MSEC; }