@Override public XSiteAdminOperations getOperations() { return cache.getAdvancedCache().getComponentRegistry().getComponent(XSiteAdminOperations.class); } };
SearchIntegrator getSearchFactory() { if (searchFactory == null) { searchFactory = cache.getComponentRegistry().getComponent(SearchIntegrator.class); } return searchFactory; }
public static <T> T getComponent(Cache<?, ?> cache, Class<T> class1, String name) { ComponentRegistry componentRegistry = SecurityActions.getCacheComponentRegistry(cache.getAdvancedCache()); T component = componentRegistry.getComponent(class1, name); if (component == null) { throw new IllegalArgumentException("Indexing was not enabled on this cache. " + class1 + " not found in registry"); } return component; }
@Override public ModelNode execute(Cache<?, ?> cache) { ActivationManager manager = cache.getAdvancedCache().getComponentRegistry().getComponent(ActivationManager.class); return new ModelNode((manager != null) ? manager.getActivationCount() : 0); } },
private static <T> T getRequiredComponent(Cache<?, ?> cache, Class<T> clazz) { ComponentRegistry componentRegistry = SecurityActions.getCacheComponentRegistry(cache.getAdvancedCache()); T component = componentRegistry.getComponent(clazz, clazz.getName()); if (component == null) { throw new IllegalStateException(clazz.getName() + " not found in component registry"); } return component; }
QueryBox getQueryBox() { if (queryBox == null) { queryBox = cache.getComponentRegistry().getComponent(QueryBox.class); } return queryBox; }
@Override public ModelNode execute(Cache<?, ?> cache) { PassivationManager manager = cache.getAdvancedCache().getComponentRegistry().getComponent(PassivationManager.class); return new ModelNode((manager != null) ? manager.getPassivations() : 0); } },
@Override public void setEnvironment(Cache<Object, Object> cache, Set<Object> inputKeys) { this.cache = cache; this.indexUpdater = new IndexUpdater(cache); ComponentRegistry componentRegistry = SecurityActions.getCacheComponentRegistry(cache.getAdvancedCache()); this.clusteringDependentLogic = componentRegistry.getComponent(ClusteringDependentLogic.class); if (everywhereKeys != null && everywhereKeys.size() > 0) keys.addAll(everywhereKeys); if (inputKeys != null && inputKeys.size() > 0) keys.addAll(inputKeys); valueDataConversion = cache.getAdvancedCache().getValueDataConversion(); }
@Override public Void run() { PassivationManager passivationManager = cache.getComponentRegistry().getComponent(PassivationManager.class); if (passivationManager != null) { passivationManager.passivateAll(); } return null; } }
@Override public XSiteAdminOperations getOperations() { return cache.getAdvancedCache().getComponentRegistry().getComponent(XSiteAdminOperations.class); } };
@Override protected ModelNode invokeCommand(Cache<?, ?> cache, ModelNode operation, OperationContext context) { XSiteAdminOperations xsiteAdminOperations = SecurityActions.getComponentRegistry(cache.getAdvancedCache()).getComponent(XSiteAdminOperations.class); return toOperationResult(xsiteAdminOperations.getSendingSiteName()); } }
@Override public Void run() { T interceptor = cache.getComponentRegistry().getComponent(interceptorClass); if (interceptor != null) { interceptor.resetStatistics(); } return null; } }
protected SearchIntegrator getSearchFactory() { if (searchFactory == null) { ComponentRegistry cr = cache.getAdvancedCache().getComponentRegistry(); searchFactory = cr.getComponent(SearchIntegrator.class); } return searchFactory; }
@Override protected ModelNode invokeCommand(Cache<?, ?> cache, ModelNode operation, OperationContext context) { XSiteAdminOperations xsiteAdminOperations = SecurityActions.getComponentRegistry(cache.getAdvancedCache()).getComponent(XSiteAdminOperations.class); xsiteAdminOperations.clearPushStateStatus(); return null; } }
public NonTxInvalidationCacheAccessDelegate(InfinispanDataRegion region, PutFromLoadValidator validator) { super(region, validator); isLocal = !region.getCache().getCacheConfiguration().clustering().cacheMode().isClustered(); ComponentRegistry cr = region.getCache().getComponentRegistry(); invoker = cr.getComponent(AsyncInterceptorChain.class); commandsFactory = cr.getComponent(CommandsFactory.class); keyPartitioner = cr.getComponent(KeyPartitioner.class); contextFactory = cr.getComponent(InvocationContextFactory.class); nonTxPutFromLoadInterceptor = cr.getComponent(NonTxPutFromLoadInterceptor.class); }
/** * 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()); } }
@Override protected ModelNode invokeCommand(Cache<?, ?> cache, ModelNode operation, OperationContext context) { RpcManagerImpl rpcManager = (RpcManagerImpl) SecurityActions.getComponentRegistry(cache.getAdvancedCache()).getComponent(RpcManager.class); if (rpcManager != null) { rpcManager.resetStatistics(); } return null; } }
private GlobalTransaction newGlobalTransaction() { TransactionFactory factory = cache.getComponentRegistry().getComponent(TransactionFactory.class); return factory.newGlobalTransaction(perCacheTxTable.getClientAddress(), false); } }
@Override public void disconnectSource(Cache<Object, Object> cache) throws CacheException { ComponentRegistry cr = cache.getAdvancedCache().getComponentRegistry(); PersistenceManager loaderManager = cr.getComponent(PersistenceManager.class); loaderManager.disableStore(RestStore.class.getName()); } }
@Override protected ModelNode invokeCommand(Cache<?, ?> cache, ModelNode operation, OperationContext context) { RecoveryAdminOperations recoveryAdminOperations = SecurityActions.getComponentRegistry(cache.getAdvancedCache()).getComponent(RecoveryAdminOperations.class); return toOperationResult(recoveryAdminOperations.showInDoubtTransactions()); } }