本文整理了Java中com.google.inject.Inject.<init>()
方法的一些代码示例,展示了Inject.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Inject.<init>()
方法的具体详情如下:
包路径:com.google.inject.Inject
类名称:Inject
方法名:<init>
暂无
代码示例来源:origin: apache/incubator-druid
public class DataSourceTaskIdHolder
{
public static final String DATA_SOURCE_BINDING = "druidDataSource";
public static final String TASK_ID_BINDING = "druidTaskId";
@Named(DATA_SOURCE_BINDING)
@Inject(optional = true)
String dataSource = null;
@Named(TASK_ID_BINDING)
@Inject(optional = true)
String taskId = null;
public String getDataSource()
{
return dataSource;
}
public String getTaskId()
{
return taskId;
}
}
代码示例来源:origin: killbill/killbill
@Inject
public DefaultCatalogService(final CatalogConfig config,
final TenantInternalApi tenantInternalApi,
final CatalogCache catalogCache,
@Named(CatalogModule.CATALOG_INVALIDATION_CALLBACK) final CacheInvalidationCallback cacheInvalidationCallback) {
this.config = config;
this.catalogCache = catalogCache;
this.cacheInvalidationCallback = cacheInvalidationCallback;
this.tenantInternalApi = tenantInternalApi;
this.isInitialized = false;
}
代码示例来源:origin: killbill/killbill
@Inject
public OverdueCheckPoster(final NotificationQueueService notificationQueueService,
final IDBI dbi, @Named(MAIN_RO_IDBI_NAMED) final IDBI roDbi, final Clock clock, final CacheControllerDispatcher cacheControllerDispatcher,
final NonEntityDao nonEntityDao, final InternalCallContextFactory internalCallContextFactory) {
super(notificationQueueService, dbi, roDbi, clock, cacheControllerDispatcher, nonEntityDao, internalCallContextFactory);
}
代码示例来源:origin: Netflix/conductor
@Inject
public EventQueues(@Named(EVENT_QUEUE_PROVIDERS_QUALIFIER) Map<String, EventQueueProvider> providers, ParametersUtils parametersUtils) {
this.providers = providers;
this.parametersUtils = parametersUtils;
}
代码示例来源:origin: killbill/killbill
@Inject
public OverdueAsyncBusPoster(final NotificationQueueService notificationQueueService,
final IDBI dbi, @Named(MAIN_RO_IDBI_NAMED) final IDBI roDbi, final Clock clock, final CacheControllerDispatcher cacheControllerDispatcher,
final NonEntityDao nonEntityDao, final InternalCallContextFactory internalCallContextFactory) {
super(notificationQueueService, dbi, roDbi, clock, cacheControllerDispatcher, nonEntityDao, internalCallContextFactory);
}
代码示例来源:origin: kairosdb/kairosdb
@Inject
public PutCommand(FilterEventBus eventBus, @Named("HOSTNAME") String hostname,
LongDataPointFactory longFactory, DoubleDataPointFactory doubleFactory)
{
super(eventBus, hostname, longFactory, doubleFactory);
}
代码示例来源:origin: Netflix/eureka
@Singleton
static class ModuleConfig {
@Inject
Config config;
@Inject(optional = true)
@Named(InternalEurekaClientModule.INSTANCE_CONFIG_NAMESPACE_KEY)
String instanceConfigNamespace;
@Inject(optional = true)
@Named(InternalEurekaClientModule.CLIENT_CONFIG_NAMESPACE_KEY)
String clientConfigNamespace;
@Inject(optional = true)
EurekaInstanceConfigFactory instanceConfigFactory;
String getInstanceConfigNamespace() {
return instanceConfigNamespace == null ? "eureka" : instanceConfigNamespace;
}
String getClientConfigNamespace() {
return clientConfigNamespace == null ? "eureka" : clientConfigNamespace;
}
EurekaInstanceConfigFactory getInstanceConfigProvider() {
return instanceConfigFactory == null
? new CompositeInstanceConfigFactory(config, getInstanceConfigNamespace())
: instanceConfigFactory;
}
}
代码示例来源:origin: kairosdb/kairosdb
@Inject
public CacheFileCleaner(@Named(CLEANING_SCHEDULE) String schedule, KairosDatastore datastore)
{
this.datastore = datastore;
this.schedule = schedule;
}
代码示例来源:origin: spotify/apollo
@Inject
HttpServerProvider(
Closer closer,
HttpServerConfig config,
@Named("http-server-on-close") Runnable onClose) {
this.closer = closer;
this.config = config;
this.onClose = onClose;
}
代码示例来源:origin: kairosdb/kairosdb
@Inject
public void setJettyShowStacktrace(@Named(JETTY_SHOW_STACKTRACE) boolean showStacktrace) {
m_showStacktrace = showStacktrace;
}
代码示例来源:origin: kairosdb/kairosdb
@Inject
public PutStringCommand(FilterEventBus eventBus, @Named("HOSTNAME") String hostname,
LongDataPointFactory longFactory, DoubleDataPointFactory doubleFactory, StringDataPointFactory stringFactory)
{
super(eventBus, hostname, longFactory, doubleFactory);
m_stringFactory = stringFactory;
}
代码示例来源:origin: Netflix/Priam
@Inject
public CommitLogBackup(
Provider<AbstractBackupPath> pathFactory, @Named("backup") IBackupFileSystem fs) {
this.pathFactory = pathFactory;
this.fs = fs;
}
代码示例来源:origin: kairosdb/kairosdb
@Inject
public KairosRetryPolicy(@Named("request_retry_count") int retryCount)
{
m_retryCount = retryCount;
}
代码示例来源:origin: Netflix/Priam
@Inject
public RestoreTokenSelector(ITokenManager tokenManager, @Named("backup") IBackupFileSystem fs) {
this.tokenManager = tokenManager;
this.fs = fs;
}
代码示例来源:origin: apache/shiro
@Inject
WebGuiceEnvironment(FilterChainResolver filterChainResolver, @Named(ShiroWebModule.NAME) ServletContext servletContext, WebSecurityManager securityManager) {
this.filterChainResolver = filterChainResolver;
this.servletContext = servletContext;
this.securityManager = securityManager;
servletContext.setAttribute(EnvironmentLoaderListener.ENVIRONMENT_ATTRIBUTE_KEY, this);
}
代码示例来源:origin: Netflix/Priam
@Inject
public UpdateCleanupPolicy(IConfiguration config, @Named("backup") IBackupFileSystem fs) {
super(config);
this.fs = fs;
}
代码示例来源:origin: killbill/killbill
@Inject
public OverdueStateApplicator(final BlockingInternalApi accessApi,
final AccountInternalApi accountApi,
final EntitlementApi entitlementApi,
final EntitlementInternalApi entitlementInternalApi,
@Named(DefaultOverdueModule.OVERDUE_NOTIFIER_CHECK_NAMED) final OverduePoster checkPoster,
final PersistentBus bus,
final TagInternalApi tagApi,
final InternalCallContextFactory internalCallContextFactory) {
this.blockingApi = accessApi;
this.accountApi = accountApi;
this.entitlementApi = entitlementApi;
this.entitlementInternalApi = entitlementInternalApi;
this.checkPoster = checkPoster;
this.tagApi = tagApi;
this.internalCallContextFactory = internalCallContextFactory;
this.bus = bus;
}
代码示例来源:origin: Netflix/Priam
@Inject
public AWSMembership(
IConfiguration config,
ICredential provider,
@Named("awsec2roleassumption") ICredential crossAccountProvider,
InstanceInfo instanceInfo) {
this.config = config;
this.provider = provider;
this.instanceInfo = instanceInfo;
this.crossAccountProvider = crossAccountProvider;
}
代码示例来源:origin: killbill/killbill
@Inject
public DefaultOverdueService(final OverdueProperties properties,
@Named(DefaultOverdueModule.OVERDUE_NOTIFIER_CHECK_NAMED) final OverdueNotifier checkNotifier,
@Named(DefaultOverdueModule.OVERDUE_NOTIFIER_ASYNC_BUS_NAMED) final OverdueNotifier asyncNotifier,
final BusService busService,
final OverdueListener listener,
final OverdueConfigCache overdueConfigCache,
@Named(DefaultOverdueModule.OVERDUE_INVALIDATION_CALLBACK) final CacheInvalidationCallback overdueCacheInvalidationCallback,
final TenantInternalApi tenantInternalApi) {
this.properties = properties;
this.checkNotifier = checkNotifier;
this.asyncNotifier = asyncNotifier;
this.busService = busService;
this.listener = listener;
this.isConfigLoaded = false;
this.overdueConfigCache = overdueConfigCache;
this.overdueCacheInvalidationCallback = overdueCacheInvalidationCallback;
this.tenantInternalApi = tenantInternalApi;
}
代码示例来源:origin: Netflix/Priam
@Inject
public BackupServlet(
IConfiguration config,
@Named("backup") IBackupFileSystem backupFs,
SnapshotBackup snapshotBackup,
IBackupStatusMgr completedBkups,
BackupVerification backupVerification) {
this.config = config;
this.backupFs = backupFs;
this.snapshotBackup = snapshotBackup;
this.completedBkups = completedBkups;
this.backupVerification = backupVerification;
}
内容来源于网络,如有侵权,请联系作者删除!