@Inject protected void injectDependencies(CacheNotifier cacheNotifier, ClusteringDependentLogic clusteringDependentLogic, EncoderRegistry encoderRegistry) { this.cacheNotifier = (CacheNotifierImpl) cacheNotifier; this.clusteringDependentLogic = clusteringDependentLogic; }
static class SomeInterceptor extends BaseCustomInterceptor { @Inject LockManager lm; DataContainer dc; @Override protected void start() { dc = cache.getAdvancedCache().getDataContainer(); } } }
@Override public ModuleCommandInitializer getModuleCommandInitializer() { return new ModuleCommandInitializer() { @Inject EmbeddedCacheManager cacheManager; @Override public void initializeReplicableCommand(ReplicableCommand c, boolean isRemote) { // nothing to do here } }; } }
@Inject public void init(DistributionManager distributionManager, StateTransferLock stateTransferLock) { this.distributionManager = distributionManager; this.stateTransferLock = stateTransferLock; }
@Inject public void inject(Cache<?, ?> cache, DistributionManager distributionManager) { this.distributionManager = distributionManager; cache.addListener(this); }
static class SomeAsyncInterceptor extends BaseCustomAsyncInterceptor { @Inject LockManager lm; DataContainer dc; @Override protected void start() { dc = cache.getAdvancedCache().getDataContainer(); } }
@Inject protected void injectDependencies(Cache cache) { this.cache = cache; }
@Inject public void inject(Cache<?, ?> cache, DistributionManager distributionManager) { this.distributionManager = distributionManager; cache.addListener(this); }
@Inject protected void injectDependencies(ComponentRegistry componentRegistry) { componentRegistry.wireDependencies(filterAndConverter); }
@Inject public void injectDep(@ComponentName(KnownComponentNames.TIMEOUT_SCHEDULE_EXECUTOR) ScheduledExecutorService scheduledExecutorService, @ComponentName(KnownComponentNames.ASYNC_OPERATIONS_EXECUTOR) Executor executor) { this.scheduledExecutorService = scheduledExecutorService; this.executor = executor; }
@Inject public void inject(Control control) throws InterruptedException { this.control = control; control.await(); injectionDone = true; }
@Inject public void initialize(final EmbeddedCacheManager cacheManager, TimeService timeService) { this.cacheManager = cacheManager; this.codecRegistry = new CodecRegistry(cacheManager.getCacheManagerConfiguration().classLoader()); this.timeService = timeService; }
@Inject void inject(@ComponentName("AA") A a, B b) { this.a = a; this.b = b; } }
/** * Acquires a Matcher instance from the ComponentRegistry of the given Cache object. */ @Inject protected void injectDependencies(Cache cache) { ComponentRegistry componentRegistry = cache.getAdvancedCache().getComponentRegistry(); queryCache = componentRegistry.getComponent(QueryCache.class); matcher = componentRegistry.getComponent(matcherImplClass); if (matcher == null) { throw new CacheException("Expected component not found in registry: " + matcherImplClass.getName()); } }
/** * Acquires a Matcher instance from the ComponentRegistry of the given Cache object. */ @Inject protected void injectDependencies(Cache cache) { ComponentRegistry componentRegistry = cache.getAdvancedCache().getComponentRegistry(); queryCache = componentRegistry.getComponent(QueryCache.class); matcher = componentRegistry.getComponent(matcherImplClass); if (matcher == null) { throw new CacheException("Expected component not found in registry: " + matcherImplClass.getName()); } }
@Scope(Scopes.GLOBAL) static class B { @ComponentName("AA") @Inject A a; }
@Scope(Scopes.NAMED_CACHE) static class E { @ComponentName("DD") @Inject D d; }
/** * Acquires a Matcher instance from the ComponentRegistry of the given Cache object. */ @Inject protected void injectDependencies(Cache cache) { this.queryCache = cache.getCacheManager().getGlobalComponentRegistry().getComponent(QueryCache.class); ComponentRegistry componentRegistry = cache.getAdvancedCache().getComponentRegistry(); matcher = componentRegistry.getComponent(matcherImplClass); if (matcher == null) { throw new CacheException("Expected component not found in registry: " + matcherImplClass.getName()); } }
@Inject public void init(TaskManager taskManager, EmbeddedCacheManager cacheManager) { EncoderRegistry encoderRegistry = cacheManager.getGlobalComponentRegistry().getComponent(EncoderRegistry.class); ServerTaskEngine engine = new ServerTaskEngine(this, cacheManager, new ScriptConversions(encoderRegistry)); taskManager.registerTaskEngine(engine); }