Aggiunto parallel stream in retrieve items dalla cache
This commit is contained in:
parent
bb47dd458e
commit
7c036172d8
@ -152,7 +152,7 @@ public class EntityCacheComponent implements ApplicationListener {
|
||||
snapshot = entityCache.get(customerDB)
|
||||
.get(tableName)
|
||||
.values()
|
||||
.stream()
|
||||
.parallelStream()
|
||||
.map(x -> (T) x.clone());
|
||||
|
||||
if (filterPredicate != null)
|
||||
|
||||
@ -581,10 +581,14 @@ public class WMSUtility {
|
||||
public static List<MtbAart> getArticoliByCodMarts(List<String> codMarts, Connection connection) throws Exception {
|
||||
if (codMarts == null || codMarts.isEmpty()) return null;
|
||||
|
||||
codMarts.replaceAll(String::toUpperCase);
|
||||
|
||||
Thread.sleep(5000);
|
||||
|
||||
final EntityCacheComponent entityCacheComponent = ApplicationContextProvider.getApplicationContext().getBean(EntityCacheComponent.class);
|
||||
|
||||
List<MtbAart> listMtbAart = entityCacheComponent.getCachedEntitiesList(
|
||||
connection.getIntegryCustomerDB(), MtbAart.ENTITY, x -> codMarts.parallelStream().anyMatch(y -> y.equalsIgnoreCase(x.getCodMart())));
|
||||
connection.getIntegryCustomerDB(), MtbAart.ENTITY, x -> codMarts.contains(x.getCodMart().toUpperCase()));
|
||||
|
||||
List<MtbAartBarCode> barCodeFromCod = getAlternativeMtbAartBarCodes(codMarts, connection);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user