final class DataSourceStaticLookup extends java.lang.Object implements DataSourceLookup
Modifier and Type | Field and Description |
---|---|
private Cache<EPDataSource> |
cache |
Constructor and Description |
---|
DataSourceStaticLookup(Cache<EPDataSource> cache) |
Modifier and Type | Method and Description |
---|---|
javax.sql.DataSource |
get(java.lang.String key)
Data source lookup.
|
boolean |
isSlave(java.lang.String key) |
void |
setTerminator(org.eclipse.jetty.util.component.LifeCycle terminatorDependency) |
void |
stop() |
private final Cache<EPDataSource> cache
@Inject public DataSourceStaticLookup(Cache<EPDataSource> cache)
@Inject public void setTerminator(@Named(value="executor") org.eclipse.jetty.util.component.LifeCycle terminatorDependency)
public javax.sql.DataSource get(java.lang.String key)
DataSourceLookup
get
in interface DataSourceLookup
key
- logical DataSource namepublic boolean isSlave(java.lang.String key)
isSlave
in interface DataSourceLookup
public void stop() throws java.lang.Exception
stop
in interface DataSourceLookup
java.lang.Exception