Package com.google.gerrit.server.schema
Class DataSourceProvider
- java.lang.Object
-
- com.google.gerrit.server.schema.DataSourceProvider
-
- All Implemented Interfaces:
LifecycleListener,com.google.inject.Provider<DataSource>,EventListener,javax.inject.Provider<DataSource>
public class DataSourceProvider extends Object implements com.google.inject.Provider<DataSource>, LifecycleListener
Provides access to the DataSource.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDataSourceProvider.Context
-
Constructor Summary
Constructors Modifier Constructor Description protectedDataSourceProvider(org.eclipse.jgit.lib.Config cfg, com.google.gerrit.metrics.MetricMaker metrics, ThreadSettingsConfig threadSettingsConfig, DataSourceProvider.Context ctx, DataSourceType dst)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataSourceget()voidstart()Invoked when the server is starting.voidstop()Invoked when the server is stopping.
-
-
-
Constructor Detail
-
DataSourceProvider
@Inject protected DataSourceProvider(org.eclipse.jgit.lib.Config cfg, com.google.gerrit.metrics.MetricMaker metrics, ThreadSettingsConfig threadSettingsConfig, DataSourceProvider.Context ctx, DataSourceType dst)
-
-
Method Detail
-
get
public DataSource get()
- Specified by:
getin interfacecom.google.inject.Provider<DataSource>- Specified by:
getin interfacejavax.inject.Provider<DataSource>
-
start
public void start()
Description copied from interface:LifecycleListenerInvoked when the server is starting.- Specified by:
startin interfaceLifecycleListener
-
stop
public void stop()
Description copied from interface:LifecycleListenerInvoked when the server is stopping.- Specified by:
stopin interfaceLifecycleListener
-
-