Package org.infinispan.loaders

Examples of org.infinispan.loaders.CacheLoaderConfig


      if (loader instanceof CacheStore) stores.put((CacheStore) loader, config);
   }

   public void purgeIfNecessary() throws CacheLoaderException {
      for (Map.Entry<CacheStore, CacheLoaderConfig> e : stores.entrySet()) {
         CacheLoaderConfig value = e.getValue();
         if (value instanceof CacheStoreConfig && ((CacheStoreConfig) value).isPurgeOnStartup())
            e.getKey().clear();
      }
   }
View Full Code Here


        Configuration configuration = this.sessionCache.getConfiguration();

        this.passivationEnabled = configuration.isCacheLoaderPassivation() && !configuration.isCacheLoaderShared();
        List<CacheLoaderConfig> loaders = configuration.getCacheLoaders();
        CacheLoaderConfig loader = !loaders.isEmpty() ? loaders.get(0) : null;
        this.requiresPurge = (loader != null) && (loader instanceof CacheStoreConfig) ? ((CacheStoreConfig) loader).isPurgeOnStartup() : false;

        this.jvmRouteHandler = configuration.getCacheMode().isDistributed() ? new JvmRouteHandler(registry, jvmRouteCacheSource, this.manager) : null;
    }
View Full Code Here

         .passivation(config.loaders().passivation())
         .preload(config.loaders().preload())
         .shared(config.loaders().shared());

      for (CacheLoaderConfiguration loader : config.loaders().cacheLoaders()) {
         CacheLoaderConfig clc = adapt(loader);
         legacy.loaders().addCacheLoader(clc);
      }

      legacy.locking()
         .concurrencyLevel(config.locking().concurrencyLevel())
View Full Code Here

      return legacy.build();
   }

   public static CacheLoaderConfig adapt(CacheLoaderConfiguration loader) {
      CacheLoaderConfig clc = null;
      if (loader instanceof LegacyLoaderAdapter<?>) {
         return ((LegacyLoaderAdapter<?>)loader).adapt();
      } else if (loader instanceof CacheStoreConfiguration) {
         if (loader instanceof LegacyStoreConfiguration) {
            LegacyStoreConfiguration store = (LegacyStoreConfiguration) loader;
View Full Code Here

   @Override
   public void init(InitializationContext ctx) {
      this.ctx = ctx;
      configuration = ctx.getConfiguration();
      loader = configuration.getLoader();
      CacheLoaderConfig cacheLoaderConfig = instantiateCacheLoaderConfig(loader.getClass());
      XmlConfigHelper.setValues(cacheLoaderConfig, configuration.properties(), false, true);
      try {
         loader.init(cacheLoaderConfig, ctx.getCache(), new StreamingMarshallerAdapter(ctx.getMarshaller()));
      } catch (CacheLoaderException e) {
         throw newCacheLoaderException(e);
View Full Code Here

TOP

Related Classes of org.infinispan.loaders.CacheLoaderConfig

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.