blob: f98d231f1d6a76681d25e478e9123991fa28a2e5 [file] [log] [blame]
${esc.hash} Named Locks using Redisson
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
This module implement named locks using Redisson. It provides two implementations, that are distributed and rely on
Redisson distributed objects feature.
Out of the box "redisson" (distributed) named lock implementations are the following:
- `rwlock-redisson` implemented in `org.eclipse.aether.named.redisson.RedissonReadWriteLockNamedLockFactory`
that uses Redisson-backed `org.redisson.api.RReadWriteLock`.
- `semaphore-redisson` implemented in `org.eclipse.aether.named.redisson.RedissonSemaphoreNamedLockFactory`
that uses Redisson-backed `org.redisson.api.RSemaphore`.
${esc.hash}${esc.hash} Open Issues/Notes
- Usage from plugins and extensions hasn't been fully tested yet.
${esc.hash}${esc.hash} Open Issues/Notes for Maven Resolver integrators
To use this implementation within your project, depending on how you integrate, you have following options:
- If you use Sisu DI, then all you need is to provide this module (and its dependencies) on classpath and you are done.
- If you use Guice, you need to add this module (and its dependencies) upfront, and bind them explicitly.
- If you use ServiceLocator, this module will not work.
${esc.hash}${esc.hash} Installation/Testing
- Create the directory `${maven.home}/lib/ext/redisson/` (if it does not exist).
- Unzip the following bundle from Maven Central to `${maven.home}/lib/ext/redisson/`:
<pre class="source">
└── <a href="https://repo.maven.apache.org/maven2/org/apache/maven/resolver/${project.artifactId}/${project.version}/${project.artifactId}-${project.version}-bundle.zip">${project.artifactId}-${project.version}-bundle.zip</a>
- Start your Redis instance on `localhost` or configure a remote instance with `${maven.conf}/maven-resolver-redisson.yaml`.
- Now start a multithreaded Maven build or multiple builds (e.g., CI server) on your project.