Package org.jboss.as.clustering.infinispan

Examples of org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager


        if (service.getState() != ServiceController.State.UP) {
            throw new CacheException(service.getStartException());
        }
        EmbeddedCacheManagerConfiguration config = service.getValue();
        GlobalConfiguration global = new GlobalConfigurationBuilder().read(config.getGlobalConfiguration()).classLoader(this.getClass().getClassLoader()).build();
        EmbeddedCacheManager manager = new DefaultEmbeddedCacheManager(global, config.getDefaultCache());
        manager.start();
        return manager;
    }
View Full Code Here


        if (service.getState() != ServiceController.State.UP) {
            throw new CacheException(service.getStartException());
        }
        EmbeddedCacheManagerConfiguration config = service.getValue();
        GlobalConfiguration global = new GlobalConfigurationBuilder().read(config.getGlobalConfiguration()).classLoader(this.getClass().getClassLoader()).build();
        EmbeddedCacheManager manager = new DefaultEmbeddedCacheManager(global, config.getDefaultCache());
        manager.start();
        return manager;
    }
View Full Code Here

    }

    @Override
    public void start(StartContext context) {
        EmbeddedCacheManagerConfiguration config = this.config.getValue();
        this.container = new DefaultEmbeddedCacheManager(config.getGlobalConfiguration(), config.getDefaultCache());
        SecurityActions.registerAndStartContainer(this.container, this);
        log.debugf("%s cache container started", config.getName());
    }
View Full Code Here

    protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException {
        final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
        final String cacheContainerName = address.getLastElement().getValue();
        final String attrName = operation.require(ModelDescriptionConstants.NAME).asString();
        final ServiceController<?> controller = context.getServiceRegistry(false).getService(EmbeddedCacheManagerService.getServiceName(cacheContainerName));
        DefaultEmbeddedCacheManager cacheManager = (DefaultEmbeddedCacheManager) controller.getValue();

        CacheManagerMetrics metric = CacheManagerMetrics.getStat(attrName);
        ModelNode result = new ModelNode();

        if (metric == null) {
View Full Code Here

            Configuration overrides = entry.getValue();
            Configuration configuration = defaults.getDefaultConfiguration(overrides.getCacheMode()).clone();
            configuration.applyOverrides(overrides);
            manager.defineConfiguration(entry.getKey(), configuration);
        }
        this.container = new DefaultEmbeddedCacheManager(manager, this.configuration.getDefaultCache());
        this.container.start();
    }
View Full Code Here

        } else {
            jmxBuilder.disable();
        }

        // create the cache manager
        this.container = new DefaultEmbeddedCacheManager(globalBuilder.build(), this.defaultCache);
        this.container.addListener(this);
        this.container.start();
        log.debugf("%s cache container started", this.name);
    }
View Full Code Here

        }
    }

    @CacheStarted
    public void cacheStarted(CacheStartedEvent event) {
        InfinispanLogger.ROOT_LOGGER.cacheStarted(event.getCacheName(), new DefaultEmbeddedCacheManager(event.getCacheManager(), null).getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName());
    }
View Full Code Here

        InfinispanLogger.ROOT_LOGGER.cacheStarted(event.getCacheName(), new DefaultEmbeddedCacheManager(event.getCacheManager(), null).getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName());
    }

    @CacheStopped
    public void cacheStopped(CacheStoppedEvent event) {
        InfinispanLogger.ROOT_LOGGER.cacheStopped(event.getCacheName(), new DefaultEmbeddedCacheManager(event.getCacheManager(), null).getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName());
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.