cstamas commented on a change in pull request #131: URL: https://github.com/apache/maven-resolver/pull/131#discussion_r750053955
########## 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: @michael-o agreed, and their location def should be refactored (as adapter can have them from session), but IMO again, as it would tackle adapter, am to leave things as is for now, merge this PR, and have another PR that get rids of static stuff AND moves the time/duration from selector to adapter (that can get things from session). WDYT? -- 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-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org