@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)
BuildContext
requestService
in interface BuildContext
T
- class of the serviceprovider
- of the service@Deprecated public void releaseService(Class<? extends ServiceProvider<?>> provider)
BuildContext
releaseService
in interface BuildContext
provider
- of the servicepublic ServiceManager getServiceManager()
BuildContext
ServiceManager
.
Clients should keep a reference to the ServiceManager
to allow for cleanup, but should not keep a reference
to the BuildContext
.getServiceManager
in interface BuildContext
public SearchFactoryImplementor getUninitializedSearchFactory()
BuildContext
SessionFactoryImplementor
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 BuildContext
public String getIndexingStrategy()
getIndexingStrategy
in interface BuildContext
SearchException
- Always thrown.Environment.INDEXING_STRATEGY
public IndexManagerHolder getAllIndexesManager()
getAllIndexesManager
in interface BuildContext
IndexManagerHolder
, storing all IndexManager
instances.SearchException
- Always thrown.public ErrorHandler getErrorHandler()
getErrorHandler
in interface BuildContext
ErrorHandler
SearchException
- Always thrown.Copyright © 2006–2016 Hibernate. All rights reserved.