Example usage for org.springframework.integration.jdbc.lock DefaultLockRepository setPrefix

List of usage examples for org.springframework.integration.jdbc.lock DefaultLockRepository setPrefix

Introduction

In this page you can find the example usage for org.springframework.integration.jdbc.lock DefaultLockRepository setPrefix.

Prototype

public void setPrefix(String prefix) 

Source Link

Document

Specify the prefix for target data base table used from queries.

Usage

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);
}