private static SearchIndexDefinition findIndexDefinitionByKeyConcept( final DtDefinition keyConceptDtDefinition) { for (final SearchIndexDefinition indexDefinition : Home.getApp().getDefinitionSpace().getAll(SearchIndexDefinition.class)) { if (indexDefinition.getKeyConceptDtDefinition().equals(keyConceptDtDefinition)) { return indexDefinition; } } return null; }
/** {@inheritDoc} */ @Override public void start() { for (final SearchIndexDefinition indexDefinition : Home.getApp().getDefinitionSpace().getAll(SearchIndexDefinition.class)) { final List<URI<? extends KeyConcept>> dirtyElements = new ArrayList<>(); dirtyElementsPerIndexName.put(indexDefinition.getName(), dirtyElements); executorService.scheduleWithFixedDelay( new ReindexTask(indexDefinition, dirtyElements, this), 1, 1, TimeUnit.SECONDS); // on dépile les dirtyElements toutes les 1 secondes } }
/** Constructeur simple pour instanciation par jersey. */ public JerseyRestProcessNetApi() { Injector.injectMembers(this, Home.getApp().getComponentSpace()); }
// Getteur sur Home car dépendance cyclique entre CollectionsManager et StoreManager private static StoreManager getStoreManager() { return Home.getApp().getComponentSpace().resolve(StoreManager.class); }