Class RedisDistributedLock
java.lang.Object
com.iantapply.orchestra.adapter.redis.RedisDistributedLock
- All Implemented Interfaces:
com.iantapply.orchestra.port.DistributedLock
public final class RedisDistributedLock
extends Object
implements com.iantapply.orchestra.port.DistributedLock
Redis lease provider using atomic NX/PX acquisition and token-checked release.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.iantapply.orchestra.port.DistributedLock
com.iantapply.orchestra.port.DistributedLock.Lease -
Constructor Summary
ConstructorsConstructorDescriptionRedisDistributedLock(URI uri, String namespace) Creates a Redis-backed lease provider. -
Method Summary
Modifier and TypeMethodDescriptionOptional<com.iantapply.orchestra.port.DistributedLock.Lease> tryAcquire(String key, Duration duration)
-
Constructor Details
-
RedisDistributedLock
-
-
Method Details
-
tryAcquire
-