Skip to content

fix typos in distributed-locks.adoc #9526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ However, the problem becomes more complex when an application is distributed and
The locking in this case is challenging and requires some shared state and its specific approach to achieve the exclusivity requirement.

Spring Integration provides a `LockRegistry` abstraction with an in-memory `DefaultLockRegistry` implementation based on the `ReentrantLock` API.
The `obtain(Object)` method of the `LockRegistrty` requires a `lock key` for specific context.
The `obtain(Object)` method of the `LockRegistry` requires a `lock key` for specific context.
For example, an aggregator uses a `correlationKey` to lock operations around its group.
This way different locks can be used concurrently.
This `obtain(Object)` method returns a `java.util.concurrent.locks.Lock` instance (depending on the `LockRegistry` implementation), therefore the rest of the logic is the same as standard Java Concurrency algorithm.
Expand All @@ -27,11 +27,11 @@ registry.executeLocked("someLockKey", () -> someExclusiveResourceCall());
The method rethrows an exception from the task call, throws an `InterruptedException` if `Lock` is interrupted.
In addition, a variant with `Duration` throws a `java.util.concurrent.TimeoutException` when `lock.tryLock()` returns `false`.

Spring Integration provides these `LockRegistrty` implementations for distributed locks:
Spring Integration provides these `LockRegistry` implementations for distributed locks:

* xref:hazelcast.adoc#hazelcast-lock-registry[Hazelcast]
* xref:jdbc/lock-registry.adoc[JDBC]
* xref:redis.adoc#redis-lock-registry[Redis]
* xref:zookeeper.adoc#zk-lock-registry[Zookeeper]

https://github.com/spring-projects/spring-integration-aws[Spring Integration AWS] extension also implements a `DynamoDbLockRegistry`.
https://github.com/spring-projects/spring-integration-aws[Spring Integration AWS] extension also implements a `DynamoDbLockRegistry`.