Skip to content
Snippets Groups Projects
Commit ca2e8e1e authored by Rustam Lotsmanenko (EPAM)'s avatar Rustam Lotsmanenko (EPAM)
Browse files

change caching map to concurrent one

parent fad1f079
No related branches found
No related tags found
1 merge request!8Google Storage Retry settings
Pipeline #294407 passed
......@@ -20,9 +20,9 @@ package org.opengroup.osdu.core.obm.drivers.gs;
import static org.springframework.beans.factory.config.BeanDefinition.SCOPE_SINGLETON;
import com.google.cloud.storage.Storage;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import javax.annotation.PreDestroy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
......@@ -41,7 +41,7 @@ import org.springframework.stereotype.Component;
@Slf4j
public class GcsPropertyObmDestinationResolver implements GcsObmDestinationResolver {
private final Map<ObmDestination, Storage> storageCache = new HashMap<>();
private final Map<ObmDestination, Storage> storageCache = new ConcurrentHashMap<>();
private final GcObmConfigurationProperties configurationProperties;
private final GoogleStorageClientSupplier storageClientBuilder;
......
......@@ -20,9 +20,9 @@ package org.opengroup.osdu.core.obm.drivers.gs;
import static org.springframework.beans.factory.config.BeanDefinition.SCOPE_SINGLETON;
import com.google.cloud.storage.Storage;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import javax.annotation.PreDestroy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
......@@ -45,7 +45,7 @@ import org.springframework.stereotype.Component;
@Slf4j
public class GcsTenantObmDestinationResolver implements GcsObmDestinationResolver {
private final Map<ObmDestination, Storage> storageCache = new HashMap<>();
private final Map<ObmDestination, Storage> storageCache = new ConcurrentHashMap<>();
private final ITenantFactory tenantInfoFactory;
private final GoogleStorageClientSupplier storageClientBuilder;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment