List of usage examples for org.springframework.integration.jdbc.lock DefaultLockRepository DefaultLockRepository
public DefaultLockRepository(DataSource dataSource, String id)
From source file:org.springframework.cloud.task.configuration.SingleInstanceTaskListener.java
private LockRegistry getDefaultLockRegistry(long executionId) { DefaultLockRepository lockRepository = new DefaultLockRepository(this.dataSource, String.valueOf(executionId)); lockRepository.setPrefix(this.taskProperties.getTablePrefix()); lockRepository.setTimeToLive(this.taskProperties.getSingleInstanceLockTtl()); lockRepository.afterPropertiesSet(); return new JdbcLockRegistry(lockRepository); }