cstamas commented on a change in pull request #131:
URL: https://github.com/apache/maven-resolver/pull/131#discussion_r750040578
##########
File path:
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/SimpleNamedLockFactorySelector.java
##########
@@ -19,36 +19,32 @@
* under the License.
*/
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import
org.eclipse.aether.internal.impl.synccontext.named.DiscriminatingNameMapper;
-import org.eclipse.aether.internal.impl.synccontext.named.GAVNameMapper;
-import org.eclipse.aether.internal.impl.synccontext.named.NameMapper;
-import org.eclipse.aether.internal.impl.synccontext.named.StaticNameMapper;
import org.eclipse.aether.named.NamedLockFactory;
+import org.eclipse.aether.named.providers.FileLockNamedLockFactory;
import org.eclipse.aether.named.providers.LocalReadWriteLockNamedLockFactory;
import org.eclipse.aether.named.providers.LocalSemaphoreNamedLockFactory;
import org.eclipse.aether.named.providers.NoopNamedLockFactory;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
/**
- * Selector for {@link NamedLockFactory} and {@link NameMapper} that selects
and exposes selected ones. Essentially
- * all the named locks configuration is here.
+ * Simple selector implementation that uses Java system properties and sane
default values.
*/
@Singleton
@Named
-public final class NamedLockFactorySelector
+public final class SimpleNamedLockFactorySelector
+ implements NamedLockFactorySelector
{
- public static final long TIME = Long.getLong(
+ private static final long TIME = Long.getLong(
"aether.syncContext.named.time", 30L
);
Review comment:
My plan is to have mvnd _replace_ this "simple" selector, but yes, is
doable as well (so mvnd can reuse this class).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]