org.hibernate.search.engine.impl
@Deprecated public class EmptyBuildContext extends Object implements BuildContext
BuildContext to retrieve additional services.
In such a case we can wrap a reference to a ServiceManager and a
SearchFactoryImplementor to create a limited BuildContext:
we're out of the boot phase at this point so not all operations are legal.
This isn't great design but we need it to temporarily keep backwards compatibility,
so this class was deprecated since it's first version.| Constructor and Description |
|---|
EmptyBuildContext(ServiceManager delegate,
SearchFactoryImplementor searchFactory)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
IndexManagerHolder |
getAllIndexesManager()
Deprecated.
To not be used on this BuildContext implementation.
|
ErrorHandler |
getErrorHandler()
Deprecated.
To not be used on this BuildContext implementation.
|
String |
getIndexingStrategy()
Deprecated.
To not be used on this BuildContext implementation.
|
ServiceManager |
getServiceManager()
Deprecated.
Access the
ServiceManager. |
SearchFactoryImplementor |
getUninitializedSearchFactory()
Deprecated.
Returns the
SessionFactoryImplementor instance. |
void |
releaseService(Class<? extends ServiceProvider<?>> provider)
Deprecated.
|
<T> T |
requestService(Class<? extends ServiceProvider<T>> provider)
Deprecated.
|
public EmptyBuildContext(ServiceManager delegate, SearchFactoryImplementor searchFactory)
@Deprecated public <T> T requestService(Class<? extends ServiceProvider<T>> provider)
BuildContextrequestService in interface BuildContextT - class of the serviceprovider - of the service@Deprecated public void releaseService(Class<? extends ServiceProvider<?>> provider)
BuildContextreleaseService in interface BuildContextprovider - of the servicepublic 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 BuildContextpublic 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()
getIndexingStrategy in interface BuildContextSearchException - Always thrown.Environment.INDEXING_STRATEGYpublic IndexManagerHolder getAllIndexesManager()
getAllIndexesManager in interface BuildContextIndexManagerHolder, storing all IndexManager instances.SearchException - Always thrown.public ErrorHandler getErrorHandler()
getErrorHandler in interface BuildContextErrorHandlerSearchException - Always thrown.Copyright © 2006-2015 Red Hat, Inc. All Rights Reserved