@Test(expected = IOException.class) public void missing_directory_config() throws Exception { Map<String, String> conf = new HashMap<>(); ServiceProfile<ExecutionLockProvider> profile = new ServiceProfile<>( "testing", BasicLockProvider.class, conf, ProfileContext.system(getClass().getClassLoader())); ExecutionLockProvider instance = profile.newInstance(); instance.newInstance("batch"); }
@Override protected ExecutionLock newInstance(Scope lockScope, String batchId) throws IOException { if (lockScope == null) { throw new IllegalArgumentException("lockScope must not be null"); } if (batchId == null) { throw new IllegalArgumentException("batchId must not be null"); } return new FileExecutionLock(lockScope, batchId, directory); }
BasicLockProvider extends ExecutionLockProvider { @Override protected ExecutionLock newInstance(Scope lockScope, String batchId) throws IOException { if (lockScope == null) { throw new IllegalArgumentException("lockScope must not be null"); } if (batchId == null) { throw new IllegalArgumentException("batchId must not be null"); } return new FileExecutionLock(lockScope, batchId, directory); } }
BasicLockProvider extends ExecutionLockProvider { @Override protected ExecutionLock newInstance(Scope lockScope, String batchId) throws IOException { if (lockScope == null) { throw new IllegalArgumentException("lockScope must not be null"); } if (batchId == null) { throw new IllegalArgumentException("batchId must not be null"); } return new FileExecutionLock(lockScope, batchId, directory); }  }
BasicLockProvider extends ExecutionLockProvider { @Override protected ExecutionLock newInstance(Scope lockScope, String batchId) throws IOException { if (lockScope == null) { throw new IllegalArgumentException("lockScope must not be null"); } if (batchId == null) { throw new IllegalArgumentException("batchId must not be null"); } return new FileExecutionLock(lockScope, batchId, directory); }  @Override void doConfigure(ServiceProfile<?> profile); }
BasicLockProvider extends ExecutionLockProvider { @Override protected ExecutionLock newInstance(Scope lockScope, String batchId) throws IOException { if (lockScope == null) { throw new IllegalArgumentException("lockScope must not be null"); } if (batchId == null) { throw new IllegalArgumentException("batchId must not be null"); } return new FileExecutionLock(lockScope, batchId, directory); }  @Override void doConfigure(ServiceProfile<?> profile); static final String KEY_DIRECTORY; }