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