@Test public void large_stepUnit() throws Exception { Map<String, String> conf = new HashMap<>(); conf.put(BasicMonitorProvider.KEY_STEP_UNIT, "0.5"); ServiceProfile<ExecutionMonitorProvider> profile = new ServiceProfile<>( "testing", BasicMonitorProvider.class, conf, ProfileContext.system(getClass().getClassLoader())); ExecutionMonitorProvider instance = profile.newInstance(); try (ExecutionMonitor monitor = instance.newInstance(CONTEXT)) { monitor.open(100); for (int i = 0; i < 100; i++) { monitor.progressed(1); } } }
@Override public PhaseMonitor newInstance(ExecutionContext context) throws InterruptedException, IOException { if (context == null) { throw new IllegalArgumentException("context must not be null"); } return new LoggingExecutionMonitor(context, stepUnit); }
BasicMonitorProvider extends ExecutionMonitorProvider { @Override public PhaseMonitor newInstance(ExecutionContext context) throws InterruptedException, IOException { if (context == null) { throw new IllegalArgumentException("context must not be null"); } return new LoggingExecutionMonitor(context, stepUnit); } }
BasicMonitorProvider extends ExecutionMonitorProvider { @Override public PhaseMonitor newInstance(ExecutionContext context) throws InterruptedException, IOException { if (context == null) { throw new IllegalArgumentException("context must not be null"); } return new LoggingExecutionMonitor(context, stepUnit); }  }
BasicMonitorProvider extends ExecutionMonitorProvider { @Override public PhaseMonitor newInstance(ExecutionContext context) throws InterruptedException, IOException { if (context == null) { throw new IllegalArgumentException("context must not be null"); } return new LoggingExecutionMonitor(context, stepUnit); }  @Override PhaseMonitor newInstance(ExecutionContext context); }
BasicMonitorProvider extends ExecutionMonitorProvider { @Override public PhaseMonitor newInstance(ExecutionContext context) throws InterruptedException, IOException { if (context == null) { throw new IllegalArgumentException("context must not be null"); } return new LoggingExecutionMonitor(context, stepUnit); }  @Override PhaseMonitor newInstance(ExecutionContext context); static final String KEY_STEP_UNIT; }