public class MutableSearchFactory extends Object implements SearchFactoryImplementorWithShareableState, SearchFactoryIntegrator, WorkerBuildContext
| Constructor and Description |
|---|
MutableSearchFactory() |
public void setDelegate(SearchFactoryImplementorWithShareableState delegate)
public Map<String,FilterDef> getFilterDefinitions()
getFilterDefinitions in interface SearchFactoryStatepublic Map<Class<?>,EntityIndexBinding> getIndexBindings()
SearchFactoryImplementorgetIndexBindings in interface SearchFactoryImplementorgetIndexBindings in interface SearchFactoryStatepublic Map<Class<?>,EntityIndexBinder> getIndexBindingForEntity()
getIndexBindingForEntity in interface SearchFactoryImplementorgetIndexBindingForEntity in interface SearchFactoryStatepublic EntityIndexBinder getIndexBindingForEntity(Class<?> entityType)
getIndexBindingForEntity in interface SearchFactoryIntegratorpublic EntityIndexBinding getIndexBinding(Class<?> entityType)
SearchFactoryIntegratorgetIndexBinding in interface SearchFactoryIntegratorentityType - the type for which to retrieve the bindingnull is returned for types which are unindexed or
unknown.public <T> DocumentBuilderContainedEntity<T> getDocumentBuilderContainedEntity(Class<T> entityType)
getDocumentBuilderContainedEntity in interface SearchFactoryImplementorpublic Worker getWorker()
getWorker in interface SearchFactoryStategetWorker in interface SearchFactoryIntegratorpublic FilterCachingStrategy getFilterCachingStrategy()
getFilterCachingStrategy in interface SearchFactoryImplementorgetFilterCachingStrategy in interface SearchFactoryStatepublic Map<String,Analyzer> getAnalyzers()
getAnalyzers in interface SearchFactoryStatepublic int getCacheBitResultsSize()
getCacheBitResultsSize in interface SearchFactoryStatepublic Properties getConfigurationProperties()
getConfigurationProperties in interface SearchFactoryStatepublic FilterDef getFilterDefinition(String name)
getFilterDefinition in interface SearchFactoryImplementorpublic SearchFactoryImplementor getUninitializedSearchFactory()
BuildContextSessionFactoryImplementor instance. Do not use until after the initialize and/or start method is
fully executed.
Implementations should not cache values provided by the SessionFactoryImplementor, but rather access them
each time, because the configuration can be dynamically updated and new changes made available.
For example, prefer:
void method() {
int size = sfi.getDirectoryProviders().size();
}
over
void method() {
int size = directoryProviders.size();
}
where directoryProviders is a class variable.getUninitializedSearchFactory in interface BuildContextpublic String getIndexingStrategy()
BuildContextgetIndexingStrategy in interface SearchFactoryImplementorgetIndexingStrategy in interface BuildContextgetIndexingStrategy in interface SearchFactoryStateEnvironment.INDEXING_STRATEGYpublic <T> T requestService(Class<? extends ServiceProvider<T>> provider)
BuildContextrequestService in interface BuildContextT - class of the serviceprovider - of the servicepublic void releaseService(Class<? extends ServiceProvider<?>> provider)
BuildContextreleaseService in interface BuildContextprovider - of the servicepublic void close()
close in interface SearchFactoryIntegratorpublic HSQuery createHSQuery()
SearchFactoryIntegratorcreateHSQuery in interface SearchFactoryIntegratorpublic int getFilterCacheBitResultsSize()
getFilterCacheBitResultsSize in interface SearchFactoryImplementorpublic Set<Class<?>> getIndexedTypesPolymorphic(Class<?>[] classes)
getIndexedTypesPolymorphic in interface SearchFactoryImplementorpublic BatchBackend makeBatchBackend(MassIndexerProgressMonitor progressMonitor)
makeBatchBackend in interface SearchFactoryImplementorpublic boolean isJMXEnabled()
isJMXEnabled in interface SearchFactoryImplementorpublic StatisticsImplementor getStatisticsImplementor()
SearchFactoryImplementorgetStatisticsImplementor in interface SearchFactoryImplementorpublic PolymorphicIndexHierarchy getIndexHierarchy()
getIndexHierarchy in interface SearchFactoryStatepublic ServiceManager getServiceManager()
BuildContextServiceManager.
Clients should keep a reference to the ServiceManager to allow for cleanup, but should not keep a reference
to the BuildContext.getServiceManager in interface BuildContextgetServiceManager in interface SearchFactoryStatepublic void optimize()
SearchFactoryoptimize in interface SearchFactorypublic void optimize(Class entityType)
SearchFactoryentityTypeoptimize in interface SearchFactoryentityType - the entity type (index) to optimizepublic Analyzer getAnalyzer(String name)
SearchFactorygetAnalyzer in interface SearchFactoryname - the name of the analyzerpublic Analyzer getAnalyzer(Class<?> clazz)
SearchFactorygetAnalyzer in interface SearchFactoryclazz - The class for which to retrieve the analyzer.public QueryContextBuilder buildQueryBuilder()
buildQueryBuilder in interface SearchFactorypublic Statistics getStatistics()
SearchFactorygetStatistics in interface SearchFactorypublic Map<Class<?>,DocumentBuilderContainedEntity<?>> getDocumentBuildersContainedEntities()
getDocumentBuildersContainedEntities in interface SearchFactoryStatepublic void addClasses(Class<?>... classes)
SearchFactoryIntegratoraddClasses in interface SearchFactoryIntegratorpublic boolean isDirtyChecksEnabled()
isDirtyChecksEnabled in interface SearchFactoryImplementortrue if we are allowed to inspect entity state to skip some indexing operations.
Can be disabled to get pre-3.4 behavior which always rebuilds the document.public boolean isStopped()
isStopped in interface SearchFactoryIntegratorpublic boolean isTransactionManagerExpected()
isTransactionManagerExpected in interface SearchFactoryStateisTransactionManagerExpected in interface WorkerBuildContexttrue if a transaction manager is expected, false otherwise.SearchConfiguration.isTransactionManagerExpected()public IndexManagerHolder getAllIndexesManager()
getAllIndexesManager in interface SearchFactoryImplementorgetAllIndexesManager in interface BuildContextgetAllIndexesManager in interface SearchFactoryStateIndexManagerHolder which gives access to all index managers known to this factorypublic IndexManagerHolder getIndexManagerHolder()
getIndexManagerHolder in interface SearchFactoryImplementorIndexManagerHolder which gives access to all index managers known to this factorypublic ErrorHandler getErrorHandler()
SearchFactoryIntegratorgetErrorHandler in interface BuildContextgetErrorHandler in interface SearchFactoryStategetErrorHandler in interface SearchFactoryIntegratorpublic IndexReaderAccessor getIndexReaderAccessor()
SearchFactorygetIndexReaderAccessor in interface SearchFactorypublic IndexedTypeDescriptor getIndexedTypeDescriptor(Class<?> entityType)
SearchFactorygetIndexedTypeDescriptor in interface SearchFactoryentityType - the entity for which to retrieve the descriptornull IndexedEntityDescriptor. This method can also be called for non indexed types.
To determine whether the entity is actually indexed IndexedTypeDescriptor.isIndexed() can be used.public Set<Class<?>> getIndexedTypes()
SearchFactorygetIndexedTypes in interface SearchFactorypublic InstanceInitializer getInstanceInitializer()
getInstanceInitializer in interface SearchFactoryImplementorgetInstanceInitializer in interface SearchFactoryStategetInstanceInitializer in interface WorkerBuildContextInstanceInitializer for class/object initialization.public TimeoutExceptionFactory getDefaultTimeoutExceptionFactory()
getDefaultTimeoutExceptionFactory in interface SearchFactoryStategetDefaultTimeoutExceptionFactory in interface SearchFactoryIntegratorpublic TimingSource getTimingSource()
getTimingSource in interface SearchFactoryImplementorgetTimingSource in interface SearchFactoryStatepublic SearchMapping getProgrammaticMapping()
getProgrammaticMapping in interface SearchFactoryStatepublic boolean isIndexMetadataComplete()
isIndexMetadataComplete in interface SearchFactoryStateisIndexMetadataComplete in interface WorkerBuildContexttrue if it is safe to assume that the information we have about
index metadata is accurate. This should be set to false for example if the index
could contain Documents related to types not known to this SearchFactory instance.SearchConfiguration.isIndexMetadataComplete()public boolean isDeleteByTermEnforced()
isDeleteByTermEnforced in interface SearchFactoryStateisDeleteByTermEnforced in interface WorkerBuildContexttrue if regardless of isIndexMetadataComplete and the number
of types present in the index it is safe to delete by term given that the underlying
store guarantees uniqueness of idspublic boolean isIdProvidedImplicit()
isIdProvidedImplicit in interface SearchFactoryStatepublic IndexManagerFactory getIndexManagerFactory()
getIndexManagerFactory in interface SearchFactoryStateCopyright © 2006-2015 Red Hat, Inc. All Rights Reserved