You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/09/06 12:51:54 UTC

[GitHub] [maven-resolver] jebeaudet commented on a change in pull request #122: Document all named locks and name mappers

jebeaudet commented on a change in pull request #122:
URL: https://github.com/apache/maven-resolver/pull/122#discussion_r702871375



##########
File path: maven-resolver-named-locks/src/site/markdown/index.md.vm
##########
@@ -20,14 +20,34 @@ under the License.
 -->
 
 Named locks are essentially locks that are assigned to some given (opaque) ID. If you work with multiple
-resources that each can have unique ID assigned (file w/ file an absolute path, some entities with unique ID),
+resources that each can have unique ID assigned (e.e., file with an absolute path, some entities with unique ID),

Review comment:
       ```suggestion
   resources that each can have unique ID assigned (i.e., file with an absolute path, some entities with unique ID),
   ```

##########
File path: maven-resolver-named-locks-redisson/src/site/markdown/index.md.vm
##########
@@ -22,7 +22,7 @@ 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 following:
+Out of the box "redisson" (distributed) named lock implementations are are following:

Review comment:
       ```suggestion
   Out of the box "redisson" (distributed) named lock implementations are the following:
   ```

##########
File path: maven-resolver-named-locks/src/site/markdown/index.md.vm
##########
@@ -20,14 +20,34 @@ under the License.
 -->
 
 Named locks are essentially locks that are assigned to some given (opaque) ID. If you work with multiple
-resources that each can have unique ID assigned (file w/ file an absolute path, some entities with unique ID),
+resources that each can have unique ID assigned (e.e., file with an absolute path, some entities with unique ID),
 then you can use named locks to make sure they are being protected from concurrent read and write actions.
 
-Named locks provide support classes for implementations, and provide out of the box two named lock implementation.
+Named locks provide support classes for implementations, and provide out of the box seven named lock implementations and three name mappers.
 
-Out of the box "local" (local to JVM) named lock implementations are following:
+Out of the box "local" (local to JVM) named lock implementations are the following:
 
 - `rwlock-local` implemented in `org.eclipse.aether.named.providers.LocalReadWriteLockNamedLockFactory` that uses
   JVM `java.util.concurrent.locks.ReentrantReadWriteLock`.
 - `semaphore-local` implemented in `org.eclipse.aether.named.providers.LocalSemaphoreNamedLockFactory` that uses
   JVM `java.util.concurrent.Semaphore`.
+- `noop` implemented in `org.eclipse.aether.named.providers.NoopNamedLockFactory` that uses no locking.
+
+Out of the box "global" (global to network) named lock implementations are the following (separate modules which require additional dependencies):
+
+- `rwlock-redisson` implemented in `org.eclipse.aether.named.redisson.RedissonReadWriteLockNamedLockFactory`.
+- `semaphore-redisson` implemented in `org.eclipse.aether.named.redisson.RedissonSemaphoreNamedLockFactory`.
+- `semaphore-hazelcast-client` implemented in `org.eclipse.aether.named.hazelcast.HazelcastClientCPSemaphoreNamedLockFactory`.
+- `semaphore-hazelcast` implemented in `org.eclipse.aether.named.hazelcast.HazelcastCPSemaphoreNamedLockFactory`.
+
+Local named locks are only suited within one JVM with a multithreaded build.
+Sharing one local repository between multiple Maven processes requires a global named lock!
+
+
+The aforementioned (opaque) IDs need to be mapped from artifacts and metadata.
+
+Out of the box name mapper implementations are the following:

Review comment:
       ```suggestion
   Out of the box, name mapper implementations are the following:
   ```

##########
File path: maven-resolver-named-locks/src/site/markdown/index.md.vm
##########
@@ -20,14 +20,34 @@ under the License.
 -->
 
 Named locks are essentially locks that are assigned to some given (opaque) ID. If you work with multiple
-resources that each can have unique ID assigned (file w/ file an absolute path, some entities with unique ID),
+resources that each can have unique ID assigned (e.e., file with an absolute path, some entities with unique ID),
 then you can use named locks to make sure they are being protected from concurrent read and write actions.
 
-Named locks provide support classes for implementations, and provide out of the box two named lock implementation.
+Named locks provide support classes for implementations, and provide out of the box seven named lock implementations and three name mappers.
 
-Out of the box "local" (local to JVM) named lock implementations are following:
+Out of the box "local" (local to JVM) named lock implementations are the following:
 
 - `rwlock-local` implemented in `org.eclipse.aether.named.providers.LocalReadWriteLockNamedLockFactory` that uses
   JVM `java.util.concurrent.locks.ReentrantReadWriteLock`.
 - `semaphore-local` implemented in `org.eclipse.aether.named.providers.LocalSemaphoreNamedLockFactory` that uses
   JVM `java.util.concurrent.Semaphore`.
+- `noop` implemented in `org.eclipse.aether.named.providers.NoopNamedLockFactory` that uses no locking.
+
+Out of the box "global" (global to network) named lock implementations are the following (separate modules which require additional dependencies):
+
+- `rwlock-redisson` implemented in `org.eclipse.aether.named.redisson.RedissonReadWriteLockNamedLockFactory`.
+- `semaphore-redisson` implemented in `org.eclipse.aether.named.redisson.RedissonSemaphoreNamedLockFactory`.
+- `semaphore-hazelcast-client` implemented in `org.eclipse.aether.named.hazelcast.HazelcastClientCPSemaphoreNamedLockFactory`.
+- `semaphore-hazelcast` implemented in `org.eclipse.aether.named.hazelcast.HazelcastCPSemaphoreNamedLockFactory`.
+
+Local named locks are only suited within one JVM with a multithreaded build.
+Sharing one local repository between multiple Maven processes requires a global named lock!

Review comment:
       if you go with `distributed`, change it here as well.
   ```suggestion
   Sharing one local repository between multiple Maven processes(i.e., on a busy CI server) requires a global named lock!
   ```

##########
File path: maven-resolver-named-locks-redisson/src/site/markdown/index.md.vm
##########
@@ -60,6 +60,6 @@ ${esc.hash}${esc.hash} Installation/Testing
   ├── <a href="https://repo1.maven.org/maven2/io/netty/netty-resolver-dns/4.1.65.Final/netty-resolver-dns-4.1.65.Final.jar">netty-resolver-dns-4.1.65.Final.jar</a>
   ├── <a href="https://repo1.maven.org/maven2/io/netty/netty-transport/4.1.65.Final/netty-transport-4.1.65.Final.jar">netty-transport-4.1.65.Final.jar</a>
   ├── <a href="https://repo1.maven.org/maven2/org/redisson/redisson/3.15.6/redisson-3.15.6.jar">redisson-3.15.6.jar</a>
-  ├── <a href="https://repo1.maven.org/maven2/org/yaml/snakeyaml/1.27/snakeyaml-1.27.jar">snakeyaml-1.27.jar</a></pre>
+  └── <a href="https://repo1.maven.org/maven2/org/yaml/snakeyaml/1.27/snakeyaml-1.27.jar">snakeyaml-1.27.jar</a></pre>

Review comment:
       off topic but is there any plans to improve this process and not have to download a bunch of jars?

##########
File path: maven-resolver-named-locks/src/site/markdown/index.md.vm
##########
@@ -20,14 +20,34 @@ under the License.
 -->
 
 Named locks are essentially locks that are assigned to some given (opaque) ID. If you work with multiple
-resources that each can have unique ID assigned (file w/ file an absolute path, some entities with unique ID),
+resources that each can have unique ID assigned (e.e., file with an absolute path, some entities with unique ID),
 then you can use named locks to make sure they are being protected from concurrent read and write actions.
 
-Named locks provide support classes for implementations, and provide out of the box two named lock implementation.
+Named locks provide support classes for implementations, and provide out of the box seven named lock implementations and three name mappers.
 
-Out of the box "local" (local to JVM) named lock implementations are following:
+Out of the box "local" (local to JVM) named lock implementations are the following:

Review comment:
       ```suggestion
   Out of the box, "local" (local to JVM) named lock implementations are the following:
   ```

##########
File path: maven-resolver-named-locks/src/site/markdown/index.md.vm
##########
@@ -20,14 +20,34 @@ under the License.
 -->
 
 Named locks are essentially locks that are assigned to some given (opaque) ID. If you work with multiple
-resources that each can have unique ID assigned (file w/ file an absolute path, some entities with unique ID),
+resources that each can have unique ID assigned (e.e., file with an absolute path, some entities with unique ID),
 then you can use named locks to make sure they are being protected from concurrent read and write actions.
 
-Named locks provide support classes for implementations, and provide out of the box two named lock implementation.
+Named locks provide support classes for implementations, and provide out of the box seven named lock implementations and three name mappers.
 
-Out of the box "local" (local to JVM) named lock implementations are following:
+Out of the box "local" (local to JVM) named lock implementations are the following:
 
 - `rwlock-local` implemented in `org.eclipse.aether.named.providers.LocalReadWriteLockNamedLockFactory` that uses
   JVM `java.util.concurrent.locks.ReentrantReadWriteLock`.
 - `semaphore-local` implemented in `org.eclipse.aether.named.providers.LocalSemaphoreNamedLockFactory` that uses
   JVM `java.util.concurrent.Semaphore`.
+- `noop` implemented in `org.eclipse.aether.named.providers.NoopNamedLockFactory` that uses no locking.
+
+Out of the box "global" (global to network) named lock implementations are the following (separate modules which require additional dependencies):

Review comment:
       Suggestion : 
   ```suggestion
   Out of the box, "distributed" named lock implementations are the following (separate modules which require additional dependencies):
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org