/** * Checks if an index exists for the given class. This is not intended to test whether the entity class is indexable * (via annotations or programmatically). * * @param c the class to check * @return true if an index exists, false otherwise */ boolean hasIndex(final Class<?> c) { return searchFactory.getIndexBindings().get(c) != null; }
private Object unproxy(Object instance, InstanceInitializer objectInitializer) { if ( instance == null ) { return null; } return objectInitializer.unproxy( instance ); }
@Override public void initialize(String directoryProviderName, Properties properties, BuildContext context) { this.indexName = directoryProviderName; this.properties = properties; this.serviceManager = context.getServiceManager(); }
public ExtendedSearchIntegrator create(SearchConfiguration configuration) { SearchIntegrator integrator = new SearchIntegratorBuilder().configuration( configuration ).buildSearchIntegrator(); searchIntegrators.add( integrator ); return integrator.unwrap( ExtendedSearchIntegrator.class ); }
@Override public EntityIndexBinding getIndexBinding(IndexedTypeIdentifier entityType) { return indexBindingForEntities.get( entityType ); }
public ClusteredCacheQueryImpl(Query luceneQuery, SearchIntegrator searchFactory, ExecutorService asyncExecutor, AdvancedCache<?, ?> cache, KeyTransformationHandler keyTransformationHandler, Class<?>... classes) { super(luceneQuery, searchFactory, cache, keyTransformationHandler, null, classes); this.asyncExecutor = asyncExecutor; this.hSearchQuery = searchFactory.createHSQuery(luceneQuery, classes); }
public BatchIndexingWorkspace(GridDialect gridDialect, SearchIntegrator search, SessionFactoryImplementor sessionFactory, IndexedTypeIdentifier indexedTypeIdentifier, CacheMode cacheMode, CountDownLatch endAllSignal, MassIndexerProgressMonitor monitor, BatchBackend backend, String tenantId) { this.gridDialect = gridDialect; this.indexedTypeIdentifier = indexedTypeIdentifier; this.tenantId = tenantId; this.searchIntegrator = search.unwrap( ExtendedSearchIntegrator.class ); this.sessionFactory = sessionFactory; this.cacheMode = cacheMode; this.endAllSignal = endAllSignal; this.batchBackend = backend; this.monitor = monitor; }
@Override public String toString() { return type == null ? "null" : type.getName(); }
public Indexer(SearchIntegrator si, Dataset<? extends AbstractBookEntity> data) { this.worker = si.getWorker(); this.dataset = data; }
@Override public IndexedTypeSet getIndexedTypeIdentifiers() { return indexBindingForEntities.keySet(); }
public JGroupsMasterMessageListener(BuildContext context, NodeSelectorService masterNodeSelector, LuceneWorkSerializer luceneWorkSerializer) { this.integrator = context.getUninitializedSearchIntegrator(); this.selector = masterNodeSelector; this.luceneWorkSerializer = luceneWorkSerializer; }
private void detectIndexNamesCollisions(Collection<IndexManager> indexManagers) { Map<String, Set<String>> indexNames = collectIndexNames( indexManagers ); validateIndexNames( indexNames ); }
/** * Checks if an index exists for the given class. This is not intended to test whether the entity class is indexable * (via annotations or programmatically). * * @param c the class to check * @return true if an index exists, false otherwise */ boolean hasIndex(final Class<?> c) { return searchFactory.getIndexBindings().get(c) != null; }
@Override public void initialize(String directoryProviderName, Properties properties, BuildContext context) { this.indexName = directoryProviderName; this.properties = properties; this.serviceManager = context.getServiceManager(); }
@Override public void afterDeserialise(SearchIntegrator extendedIntegrator) { this.extendedIntegrator = extendedIntegrator.unwrap( ExtendedSearchIntegrator.class ); }
private Object unproxy(Object instance, InstanceInitializer objectInitializer) { if ( instance == null ) { return null; } return objectInitializer.unproxy( instance ); }
@Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return type -> { EntityIndexBinding entityIndexBinding = searchFactory.getIndexBindings().get(type); if (entityIndexBinding == null) { return IndexedFieldProvider.NO_INDEXING; } return new HibernateSearchFieldIndexingMetadata(entityIndexBinding); }; }
@Override public void start(Properties properties, BuildContext context) { this.serviceManager = context.getServiceManager(); }
@Override public void start(Properties properties, BuildContext context) { this.serviceManager = context.getServiceManager(); }
@Override public void start(Properties properties, BuildContext context) { this.serviceManager = context.getServiceManager(); }