cstamas commented on a change in pull request #77:
URL: https://github.com/apache/maven-resolver/pull/77#discussion_r605525855



##########
File path: 
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/NamedSyncContextFactory.java
##########
@@ -0,0 +1,128 @@
+package org.eclipse.aether.internal.impl.synccontext;
+
+/*
+ * 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.
+ */
+
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.SyncContext;
+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.NamedLockFactoryAdapter;
+import org.eclipse.aether.internal.impl.synccontext.named.StaticNameMapper;
+import 
org.eclipse.aether.internal.impl.synccontext.named.takari.TakariNamedLockFactory;
+import 
org.eclipse.aether.internal.impl.synccontext.named.takari.TakariNameMapper;
+import org.eclipse.aether.named.NamedLockFactory;
+import org.eclipse.aether.named.providers.LocalReadWriteLockNamedLockFactory;
+import org.eclipse.aether.named.providers.LocalSemaphoreNamedLockFactory;
+
+import javax.annotation.PreDestroy;
+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;
+
+/**
+ * Named {@link SyncContextFactoryDelegate} implementation that selects 
underlying {@link NamedLockFactory}
+ * implementation at creation.
+ */
+@Singleton
+@Named( NamedSyncContextFactory.NAME )
+public final class NamedSyncContextFactory
+        implements SyncContextFactoryDelegate
+{
+    public static final String NAME = "named";
+
+    private static final String FACTORY_NAME = System.getProperty(
+            "aether.syncContext.named.factory", 
LocalReadWriteLockNamedLockFactory.NAME
+    );
+
+    private static final String NAME_MAPPING = System.getProperty(
+        "aether.syncContext.named.nameMapping", DiscriminatingNameMapper.NAME
+    );
+
+    private static final long TIME_OUT = Long.getLong(
+            "aether.syncContext.named.timeOut", 30L
+    );
+
+    private static final TimeUnit TIME_UNIT = TimeUnit.valueOf( 
System.getProperty(
+            "aether.syncContext.named.timeUnit", TimeUnit.SECONDS.name()

Review comment:
       fixed




-- 
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.

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


Reply via email to