public class RedisLockProvider extends Object implements LockProvider
| Constructor and Description |
|---|
RedisLockProvider(org.springframework.data.redis.connection.RedisConnectionFactory redisConn) |
RedisLockProvider(org.springframework.data.redis.connection.RedisConnectionFactory redisConn,
String environment)
Creates RedisLockProvider
|
| Modifier and Type | Method and Description |
|---|---|
Optional<SimpleLock> |
lock(LockConfiguration lockConfiguration) |
public RedisLockProvider(org.springframework.data.redis.connection.RedisConnectionFactory redisConn)
public RedisLockProvider(org.springframework.data.redis.connection.RedisConnectionFactory redisConn,
String environment)
redisConn - RedisConnectionFactoryenvironment - environment is part of the key and thus makes sure there is not key conflict between
multiple ShedLock instances running on the same Redispublic Optional<SimpleLock> lock(LockConfiguration lockConfiguration)
lock in interface LockProviderCopyright © 2019. All rights reserved.