2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 * Copyright © 2017 Amdocs
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
21 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 package org.onap.aai.sparky.aggregation.sync;
25 import static java.util.concurrent.CompletableFuture.supplyAsync;
27 import java.io.IOException;
28 import java.util.ArrayList;
29 import java.util.Deque;
30 import java.util.EnumSet;
31 import java.util.Iterator;
33 import java.util.concurrent.ConcurrentHashMap;
34 import java.util.concurrent.ConcurrentLinkedDeque;
35 import java.util.concurrent.ExecutorService;
36 import java.util.concurrent.atomic.AtomicInteger;
37 import java.util.function.Supplier;
39 import org.onap.aai.cl.api.Logger;
40 import org.onap.aai.cl.eelf.LoggerFactory;
41 import org.onap.aai.cl.mdc.MdcContext;
42 import org.onap.aai.restclient.client.OperationResult;
43 import org.onap.aai.sparky.config.oxm.OxmEntityDescriptor;
44 import org.onap.aai.sparky.config.oxm.OxmEntityLookup;
45 import org.onap.aai.sparky.dal.ActiveInventoryAdapter;
46 import org.onap.aai.sparky.dal.NetworkTransaction;
47 import org.onap.aai.sparky.dal.rest.HttpMethod;
48 import org.onap.aai.sparky.logging.AaiUiMsgs;
49 import org.onap.aai.sparky.sync.AbstractEntitySynchronizer;
50 import org.onap.aai.sparky.sync.IndexSynchronizer;
51 import org.onap.aai.sparky.sync.SynchronizerConstants;
52 import org.onap.aai.sparky.sync.config.ElasticSearchSchemaConfig;
53 import org.onap.aai.sparky.sync.config.NetworkStatisticsConfig;
54 import org.onap.aai.sparky.sync.entity.AggregationEntity;
55 import org.onap.aai.sparky.sync.entity.MergableEntity;
56 import org.onap.aai.sparky.sync.entity.SelfLinkDescriptor;
57 import org.onap.aai.sparky.sync.enumeration.OperationState;
58 import org.onap.aai.sparky.sync.enumeration.SynchronizerState;
59 import org.onap.aai.sparky.sync.task.PerformActiveInventoryRetrieval;
60 import org.onap.aai.sparky.sync.task.PerformElasticSearchPut;
61 import org.onap.aai.sparky.sync.task.PerformElasticSearchRetrieval;
62 import org.onap.aai.sparky.sync.task.PerformElasticSearchUpdate;
63 import org.onap.aai.sparky.util.NodeUtils;
66 import com.fasterxml.jackson.core.JsonProcessingException;
67 import com.fasterxml.jackson.databind.JsonNode;
68 import com.fasterxml.jackson.databind.ObjectReader;
69 import com.fasterxml.jackson.databind.node.ArrayNode;
72 * The Class AutosuggestionSynchronizer.
74 public class AggregationSynchronizer extends AbstractEntitySynchronizer
75 implements IndexSynchronizer {
78 * The Class RetryAggregationEntitySyncContainer.
80 private class RetryAggregationEntitySyncContainer {
81 NetworkTransaction txn;
85 * Instantiates a new retry aggregation entity sync container.
90 public RetryAggregationEntitySyncContainer(NetworkTransaction txn, AggregationEntity ae) {
95 public NetworkTransaction getNetworkTransaction() {
99 public AggregationEntity getAggregationEntity() {
104 private static final Logger LOG =
105 LoggerFactory.getInstance().getLogger(AggregationSynchronizer.class);
106 private static final String INSERTION_DATE_TIME_FORMAT = "yyyyMMdd'T'HHmmssZ";
108 private boolean allWorkEnumerated;
109 private Deque<SelfLinkDescriptor> selflinks;
110 private Deque<RetryAggregationEntitySyncContainer> retryQueue;
111 private Map<String, Integer> retryLimitTracker;
112 protected ExecutorService esPutExecutor;
113 private ConcurrentHashMap<String, AtomicInteger> entityCounters;
114 private boolean syncInProgress;
115 private Map<String, String> contextMap;
116 private String entityType;
117 private ElasticSearchSchemaConfig schemaConfig;
118 private OxmEntityLookup oxmEntityLookup;
121 * Instantiates a new entity aggregation synchronizer.
123 * @param indexName the index name
124 * @throws Exception the exception
126 public AggregationSynchronizer(String entityType, ElasticSearchSchemaConfig schemaConfig,
127 int numSyncWorkers, int numActiveInventoryWorkers, int numElasticWorkers,
128 NetworkStatisticsConfig aaiStatConfig, NetworkStatisticsConfig esStatConfig,
129 OxmEntityLookup oxmEntityLookup) throws Exception {
131 super(LOG, "AGGES-" + schemaConfig.getIndexName().toUpperCase(), numSyncWorkers,
132 numActiveInventoryWorkers, numElasticWorkers, schemaConfig.getIndexName(),aaiStatConfig, esStatConfig);
134 this.oxmEntityLookup = oxmEntityLookup;
136 this.schemaConfig = schemaConfig;
137 this.entityType = entityType;
138 this.allWorkEnumerated = false;
139 this.entityCounters = new ConcurrentHashMap<String, AtomicInteger>();
140 this.synchronizerName = "Entity Aggregation Synchronizer";
141 this.enabledStatFlags = EnumSet.of(StatFlag.AAI_REST_STATS, StatFlag.ES_REST_STATS);
142 this.syncInProgress = false;
143 this.allWorkEnumerated = false;
144 this.selflinks = new ConcurrentLinkedDeque<SelfLinkDescriptor>();
145 this.retryQueue = new ConcurrentLinkedDeque<RetryAggregationEntitySyncContainer>();
146 this.retryLimitTracker = new ConcurrentHashMap<String, Integer>();
148 this.esPutExecutor = NodeUtils.createNamedExecutor("AGGES-ES-PUT", 1, LOG);
150 this.aaiEntityStats.intializeEntityCounters(entityType);
151 this.esEntityStats.intializeEntityCounters(entityType);
153 this.contextMap = MDC.getCopyOfContextMap();
157 * Collect all the work.
159 * @return the operation state
161 private OperationState collectAllTheWork() {
162 final Map<String, String> contextMap = MDC.getCopyOfContextMap();
163 final String entity = this.getEntityType();
166 aaiWorkOnHand.set(1);
168 supplyAsync(new Supplier<Void>() {
172 MDC.setContextMap(contextMap);
173 OperationResult typeLinksResult = null;
175 typeLinksResult = aaiAdapter.getSelfLinksByEntityType(entity);
176 aaiWorkOnHand.decrementAndGet();
177 processEntityTypeSelfLinks(typeLinksResult);
178 } catch (Exception exc) {
179 LOG.error(AaiUiMsgs.ERROR_GENERIC, "Processing execption while building working set. Error:"
186 }, aaiExecutor).whenComplete((result, error) -> {
189 LOG.error(AaiUiMsgs.ERROR_GENERIC,
190 "An error occurred getting data from AAI. Error = " + error.getMessage());
194 while (aaiWorkOnHand.get() != 0) {
196 if (LOG.isDebugEnabled()) {
197 LOG.debug(AaiUiMsgs.WAIT_FOR_ALL_SELFLINKS_TO_BE_COLLECTED);
203 aaiWorkOnHand.set(selflinks.size());
204 allWorkEnumerated = true;
207 while (!isSyncDone()) {
213 * Make sure we don't hang on to retries that failed which could cause issues during future
216 retryLimitTracker.clear();
218 } catch (Exception exc) {
219 // TODO -> LOG, waht should be logged here?
222 return OperationState.OK;
227 * Perform retry sync.
229 private void performRetrySync() {
230 while (retryQueue.peek() != null) {
232 RetryAggregationEntitySyncContainer rsc = retryQueue.poll();
235 AggregationEntity ae = rsc.getAggregationEntity();
236 NetworkTransaction txn = rsc.getNetworkTransaction();
241 * In this retry flow the se object has already derived its fields
243 link = elasticSearchAdapter.buildElasticSearchGetDocUrl(getIndexName(), ae.getId());
244 } catch (Exception exc) {
245 LOG.error(AaiUiMsgs.ES_FAILED_TO_CONSTRUCT_URI, exc.getLocalizedMessage());
249 NetworkTransaction retryTransaction = new NetworkTransaction();
250 retryTransaction.setLink(link);
251 retryTransaction.setEntityType(txn.getEntityType());
252 retryTransaction.setDescriptor(txn.getDescriptor());
253 retryTransaction.setOperationType(HttpMethod.GET);
256 * IMPORTANT - DO NOT incrementAndGet the esWorkOnHand as this is a retry flow! We already
257 * called incrementAndGet when queuing the failed PUT!
260 supplyAsync(new PerformElasticSearchRetrieval(retryTransaction, elasticSearchAdapter),
261 esExecutor).whenComplete((result, error) -> {
263 esWorkOnHand.decrementAndGet();
266 LOG.error(AaiUiMsgs.ES_RETRIEVAL_FAILED_RESYNC, error.getLocalizedMessage());
268 updateElasticSearchCounters(result);
269 performDocumentUpsert(result, ae);
279 * Perform document upsert.
281 * @param esGetTxn the es get txn
284 protected void performDocumentUpsert(NetworkTransaction esGetTxn, AggregationEntity ae) {
288 * As part of the response processing we need to do the following:
289 * <li>1. Extract the version (if present), it will be the ETAG when we use the
290 * Search-Abstraction-Service
291 * <li>2. Spawn next task which is to do the PUT operation into elastic with or with the version
293 * <li>a) if version is null or RC=404, then standard put, no _update with version tag
294 * <li>b) if version != null, do PUT with _update?version= versionNumber in the URI to elastic
300 link = elasticSearchAdapter.buildElasticSearchGetDocUrl(getIndexName(), ae.getId());
301 } catch (Exception exc) {
302 LOG.error(AaiUiMsgs.ES_LINK_UPSERT, exc.getLocalizedMessage());
306 String versionNumber = null;
307 boolean wasEntryDiscovered = false;
308 if (esGetTxn.getOperationResult().getResultCode() == 404) {
309 LOG.info(AaiUiMsgs.ES_SIMPLE_PUT, ae.getEntityPrimaryKeyValue());
310 } else if (esGetTxn.getOperationResult().getResultCode() == 200) {
311 wasEntryDiscovered = true;
313 versionNumber = NodeUtils.extractFieldValueFromObject(
314 NodeUtils.convertJsonStrToJsonNode(esGetTxn.getOperationResult().getResult()),
316 } catch (IOException exc) {
318 "Error extracting version number from response, aborting aggregation entity sync of "
319 + ae.getEntityPrimaryKeyValue() + ". Error - " + exc.getLocalizedMessage();
320 LOG.error(AaiUiMsgs.ERROR_EXTRACTING_FROM_RESPONSE, message);
325 * Not being a 200 does not mean a failure. eg 201 is returned for created. TODO -> Should we
328 LOG.error(AaiUiMsgs.ES_OPERATION_RETURN_CODE,
329 String.valueOf(esGetTxn.getOperationResult().getResultCode()));
334 String jsonPayload = null;
335 if (wasEntryDiscovered) {
337 ArrayList<JsonNode> sourceObject = new ArrayList<JsonNode>();
338 NodeUtils.extractObjectsByKey(
339 NodeUtils.convertJsonStrToJsonNode(esGetTxn.getOperationResult().getResult()),
340 "_source", sourceObject);
342 if (!sourceObject.isEmpty()) {
343 String responseSource = NodeUtils.convertObjectToJson(sourceObject.get(0), false);
344 MergableEntity me = mapper.readValue(responseSource, MergableEntity.class);
345 ObjectReader updater = mapper.readerForUpdating(me);
346 MergableEntity merged = updater.readValue(ae.getAsJson());
347 jsonPayload = mapper.writeValueAsString(merged);
349 } catch (IOException exc) {
351 "Error extracting source value from response, aborting aggregation entity sync of "
352 + ae.getEntityPrimaryKeyValue() + ". Error - " + exc.getLocalizedMessage();
353 LOG.error(AaiUiMsgs.ERROR_EXTRACTING_FROM_RESPONSE, message);
357 jsonPayload = ae.getAsJson();
360 if (wasEntryDiscovered) {
361 if (versionNumber != null && jsonPayload != null) {
363 String requestPayload =
364 elasticSearchAdapter.buildBulkImportOperationRequest(schemaConfig.getIndexName(),
365 schemaConfig.getIndexDocType(), ae.getId(), versionNumber, jsonPayload);
367 NetworkTransaction transactionTracker = new NetworkTransaction();
368 transactionTracker.setEntityType(esGetTxn.getEntityType());
369 transactionTracker.setDescriptor(esGetTxn.getDescriptor());
370 transactionTracker.setOperationType(HttpMethod.PUT);
372 esWorkOnHand.incrementAndGet();
373 supplyAsync(new PerformElasticSearchUpdate(elasticSearchAdapter.getBulkUrl(),
374 requestPayload, elasticSearchAdapter, transactionTracker), esPutExecutor)
375 .whenComplete((result, error) -> {
377 esWorkOnHand.decrementAndGet();
380 String message = "Aggregation entity sync UPDATE PUT error - "
381 + error.getLocalizedMessage();
382 LOG.error(AaiUiMsgs.ERROR_GENERIC, message);
384 updateElasticSearchCounters(result);
385 processStoreDocumentResult(result, esGetTxn, ae);
391 if (link != null && jsonPayload != null) {
393 NetworkTransaction updateElasticTxn = new NetworkTransaction();
394 updateElasticTxn.setLink(link);
395 updateElasticTxn.setEntityType(esGetTxn.getEntityType());
396 updateElasticTxn.setDescriptor(esGetTxn.getDescriptor());
397 updateElasticTxn.setOperationType(HttpMethod.PUT);
399 esWorkOnHand.incrementAndGet();
400 supplyAsync(new PerformElasticSearchPut(jsonPayload, updateElasticTxn, elasticSearchAdapter),
401 esPutExecutor).whenComplete((result, error) -> {
403 esWorkOnHand.decrementAndGet();
407 "Aggregation entity sync UPDATE PUT error - " + error.getLocalizedMessage();
408 LOG.error(AaiUiMsgs.ERROR_GENERIC, message);
410 updateElasticSearchCounters(result);
411 processStoreDocumentResult(result, esGetTxn, ae);
416 } catch (Exception exc) {
417 String message = "Exception caught during aggregation entity sync PUT operation. Message - "
418 + exc.getLocalizedMessage();
419 LOG.error(AaiUiMsgs.ERROR_GENERIC, message);
424 * Should allow retry.
427 * @return true, if successful
429 private boolean shouldAllowRetry(String id) {
430 boolean isRetryAllowed = true;
431 if (retryLimitTracker.get(id) != null) {
432 Integer currentCount = retryLimitTracker.get(id);
433 if (currentCount.intValue() >= RETRY_COUNT_PER_ENTITY_LIMIT.intValue()) {
434 isRetryAllowed = false;
435 String message = "Aggregation entity re-sync limit reached for " + id
436 + ", re-sync will no longer be attempted for this entity";
437 LOG.error(AaiUiMsgs.ERROR_GENERIC, message);
439 Integer newCount = new Integer(currentCount.intValue() + 1);
440 retryLimitTracker.put(id, newCount);
443 Integer firstRetryCount = new Integer(1);
444 retryLimitTracker.put(id, firstRetryCount);
447 return isRetryAllowed;
451 * Process store document result.
453 * @param esPutResult the es put result
454 * @param esGetResult the es get result
457 private void processStoreDocumentResult(NetworkTransaction esPutResult,
458 NetworkTransaction esGetResult, AggregationEntity ae) {
460 OperationResult or = esPutResult.getOperationResult();
462 if (!or.wasSuccessful()) {
463 if (or.getResultCode() == VERSION_CONFLICT_EXCEPTION_CODE) {
465 if (shouldAllowRetry(ae.getId())) {
466 esWorkOnHand.incrementAndGet();
468 RetryAggregationEntitySyncContainer rsc =
469 new RetryAggregationEntitySyncContainer(esGetResult, ae);
470 retryQueue.push(rsc);
472 String message = "Store document failed during aggregation entity synchronization"
473 + " due to version conflict. Entity will be re-synced.";
474 LOG.warn(AaiUiMsgs.ERROR_GENERIC, message);
478 "Store document failed during aggregation entity synchronization with result code "
479 + or.getResultCode() + " and result message " + or.getResult();
480 LOG.error(AaiUiMsgs.ERROR_GENERIC, message);
488 private void syncEntityTypes() {
490 while (selflinks.peek() != null) {
492 SelfLinkDescriptor linkDescriptor = selflinks.poll();
493 aaiWorkOnHand.decrementAndGet();
495 OxmEntityDescriptor descriptor = null;
497 if (linkDescriptor.getSelfLink() != null && linkDescriptor.getEntityType() != null) {
499 descriptor = oxmEntityLookup.getEntityDescriptors().get(linkDescriptor.getEntityType());
501 if (descriptor == null) {
502 LOG.error(AaiUiMsgs.MISSING_ENTITY_DESCRIPTOR, linkDescriptor.getEntityType());
503 // go to next element in iterator
507 NetworkTransaction txn = new NetworkTransaction();
508 txn.setDescriptor(descriptor);
509 txn.setLink(linkDescriptor.getSelfLink());
510 txn.setOperationType(HttpMethod.GET);
511 txn.setEntityType(linkDescriptor.getEntityType());
513 aaiWorkOnHand.incrementAndGet();
515 supplyAsync(new PerformActiveInventoryRetrieval(txn, aaiAdapter), aaiExecutor)
516 .whenComplete((result, error) -> {
518 aaiWorkOnHand.decrementAndGet();
521 LOG.error(AaiUiMsgs.AAI_RETRIEVAL_FAILED_GENERIC, error.getLocalizedMessage());
523 if (result == null) {
524 LOG.error(AaiUiMsgs.AAI_RETRIEVAL_FAILED_FOR_SELF_LINK,
525 linkDescriptor.getSelfLink());
527 updateActiveInventoryCounters(result);
528 fetchDocumentForUpsert(result);
539 * Fetch document for upsert.
543 private void fetchDocumentForUpsert(NetworkTransaction txn) {
545 if (!txn.getOperationResult().wasSuccessful()) {
546 String message = "Self link failure. Result - " + txn.getOperationResult().getResult();
547 LOG.error(AaiUiMsgs.ERROR_GENERIC, message);
552 final String jsonResult = txn.getOperationResult().getResult();
553 if (jsonResult != null && jsonResult.length() > 0) {
555 AggregationEntity ae = new AggregationEntity();
556 ae.setLink(ActiveInventoryAdapter.extractResourcePath(txn.getLink()));
557 populateAggregationEntityDocument(ae, jsonResult, txn.getDescriptor());
562 link = elasticSearchAdapter.buildElasticSearchGetDocUrl(getIndexName(), ae.getId());
563 } catch (Exception exc) {
564 LOG.error(AaiUiMsgs.ES_FAILED_TO_CONSTRUCT_QUERY, exc.getLocalizedMessage());
568 NetworkTransaction n2 = new NetworkTransaction();
570 n2.setEntityType(txn.getEntityType());
571 n2.setDescriptor(txn.getDescriptor());
572 n2.setOperationType(HttpMethod.GET);
574 esWorkOnHand.incrementAndGet();
576 supplyAsync(new PerformElasticSearchRetrieval(n2, elasticSearchAdapter), esExecutor)
577 .whenComplete((result, error) -> {
579 esWorkOnHand.decrementAndGet();
582 LOG.error(AaiUiMsgs.ES_RETRIEVAL_FAILED, error.getLocalizedMessage());
584 updateElasticSearchCounters(result);
585 performDocumentUpsert(result, ae);
591 } catch (JsonProcessingException exc) {
592 LOG.error(AaiUiMsgs.ERROR_GENERIC,
593 "There was a JSON processing error fetching the elastic document for upsert. Error: "
595 } catch (IOException exc) {
596 LOG.error(AaiUiMsgs.ERROR_GENERIC,
597 "There was an IO error fetching the elastic document for upsert. Error: " + exc.getMessage());
603 * Populate aggregation entity document.
606 * @param result the result
607 * @param resultDescriptor the result descriptor
608 * @throws JsonProcessingException the json processing exception
609 * @throws IOException Signals that an I/O exception has occurred.
611 protected void populateAggregationEntityDocument(AggregationEntity doc, String result,
612 OxmEntityDescriptor resultDescriptor) throws JsonProcessingException, IOException {
613 doc.setEntityType(resultDescriptor.getEntityName());
614 JsonNode entityNode = mapper.readTree(result);
615 Map<String, Object> map = mapper.convertValue(entityNode, Map.class);
616 doc.copyAttributeKeyValuePair(map);
620 * Process entity type self links.
622 * @param operationResult the operation result
624 private void processEntityTypeSelfLinks(OperationResult operationResult) {
626 JsonNode rootNode = null;
628 if ( operationResult == null ) {
632 final String jsonResult = operationResult.getResult();
634 if (jsonResult != null && jsonResult.length() > 0 && operationResult.wasSuccessful()) {
637 rootNode = mapper.readTree(jsonResult);
638 } catch (IOException exc) {
640 "Could not deserialize JSON (representing operation result) as node tree. " +
641 "Operation result = " + jsonResult + ". " + exc.getLocalizedMessage();
642 LOG.error(AaiUiMsgs.JSON_PROCESSING_ERROR, message);
645 JsonNode resultData = rootNode.get("result-data");
646 ArrayNode resultDataArrayNode = null;
648 if (resultData.isArray()) {
649 resultDataArrayNode = (ArrayNode) resultData;
651 Iterator<JsonNode> elementIterator = resultDataArrayNode.elements();
652 JsonNode element = null;
654 while (elementIterator.hasNext()) {
655 element = elementIterator.next();
657 final String resourceType = NodeUtils.getNodeFieldAsText(element, "resource-type");
658 final String resourceLink = NodeUtils.getNodeFieldAsText(element, "resource-link");
660 OxmEntityDescriptor descriptor = null;
662 if (resourceType != null && resourceLink != null) {
664 descriptor = oxmEntityLookup.getEntityDescriptors().get(resourceType);
666 if (descriptor == null) {
667 LOG.error(AaiUiMsgs.MISSING_ENTITY_DESCRIPTOR, resourceType);
668 // go to next element in iterator
672 selflinks.add(new SelfLinkDescriptor(resourceLink, SynchronizerConstants.NODES_ONLY_MODIFIER, resourceType));
685 * @see org.openecomp.sparky.synchronizer.IndexSynchronizer#doSync()
688 public OperationState doSync() {
689 this.syncDurationInMs = -1;
690 syncStartedTimeStampInMs = System.currentTimeMillis();
691 String txnID = NodeUtils.getRandomTxnId();
692 MdcContext.initialize(txnID, "AggregationSynchronizer", "", "Sync", "");
694 return collectAllTheWork();
698 public SynchronizerState getState() {
701 return SynchronizerState.PERFORMING_SYNCHRONIZATION;
704 return SynchronizerState.IDLE;
711 * @see org.openecomp.sparky.synchronizer.IndexSynchronizer#getStatReport(boolean)
714 public String getStatReport(boolean showFinalReport) {
715 syncDurationInMs = System.currentTimeMillis() - syncStartedTimeStampInMs;
716 return getStatReport(syncDurationInMs, showFinalReport);
719 public String getEntityType() {
723 public void setEntityType(String entityType) {
724 this.entityType = entityType;
730 * @see org.openecomp.sparky.synchronizer.IndexSynchronizer#shutdown()
733 public void shutdown() {
734 this.shutdownExecutors();
738 protected boolean isSyncDone() {
740 int totalWorkOnHand = aaiWorkOnHand.get() + esWorkOnHand.get();
742 if (LOG.isDebugEnabled()) {
743 LOG.debug(AaiUiMsgs.DEBUG_GENERIC, indexName + ", isSyncDone(), totalWorkOnHand = "
744 + totalWorkOnHand + " all work enumerated = " + allWorkEnumerated);
747 if (totalWorkOnHand > 0 || !allWorkEnumerated) {
751 this.syncInProgress = false;
759 * @see org.openecomp.sparky.synchronizer.AbstractEntitySynchronizer#clearCache()
762 public void clearCache() {
764 if (syncInProgress) {
765 LOG.debug(AaiUiMsgs.DEBUG_GENERIC,
766 "Autosuggestion Entity Summarizer in progress, request to clear cache ignored");
771 this.resetCounters();
772 if (entityCounters != null) {
773 entityCounters.clear();
776 allWorkEnumerated = false;