[infinispan-issues] [JBoss JIRA] (ISPN-1777) Add LoadersConfigurationBuilder.clearCacheLoaders() method

Manik Surtani (JIRA) jira-events at lists.jboss.org
Mon Jan 30 10:33:48 EST 2012


     [ https://issues.jboss.org/browse/ISPN-1777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manik Surtani reassigned ISPN-1777:
-----------------------------------

    Assignee: Pete Muir  (was: Manik Surtani)

    
> Add LoadersConfigurationBuilder.clearCacheLoaders() method
> ----------------------------------------------------------
>
>                 Key: ISPN-1777
>                 URL: https://issues.jboss.org/browse/ISPN-1777
>             Project: Infinispan
>          Issue Type: Feature Request
>          Components: Configuration
>    Affects Versions: 5.1.0.FINAL
>            Reporter: Paul Ferraro
>            Assignee: Pete Muir
>             Fix For: 5.1.1.CR1, 5.1.1.FINAL
>
>
> The use case for this is defining a cache for web session replication for a single application.  The cache needs a unique file cache store location.  The only way to modify the location is by copy each sub-builder except the loaders builder, and copying the loader properties manually.  The ability to clear cache loaders of a builder would simplify this greatly.
> e.g.
> I could replace:
>         ConfigurationBuilder builder = new ConfigurationBuilder().name(config.name());
>         // Copy everything except loaders
>         builder.clustering().read(config.clustering())
>                 .customInterceptors().read(config.customInterceptors())
>                 .dataContainer().read(config.dataContainer())
>                 .deadlockDetection().read(config.deadlockDetection())
>                 .eviction().read(config.eviction())
>                 .expiration().read(config.expiration())
>                 .indexing().read(config.indexing())
>                 .invocationBatching().read(config.invocationBatching())
>                 .jmxStatistics().read(config.jmxStatistics())
>                 .locking().read(config.locking())
>                 .storeAsBinary().read(config.storeAsBinary())
>                 .transaction().read(config.transaction())
>                 .versioning().read(config.versioning())
>         ;
>         if (!config.loaders().cacheLoaders().isEmpty()) {
>             builder.loaders().clearCacheLoaders();
>             // Our cache needs a unique passivation location
>             for (AbstractLoaderConfiguration loader: config.loaders().cacheLoaders()) {
>                 this.addCacheLoader(builder.loaders(), loader, manager)
>                     .async().read(loader.async())
>                     .singletonStore().read(loader.singletonStore())
>                 ;
>             }
>         }
> with:
>         ConfigurationBuilder builder = new ConfigurationBuilder().read(config);
>         builder.loaders().clearCacheLoaders();
>         // Our cache needs a unique passivation location
>         for (AbstractLoaderConfiguration loader: config.loaders().cacheLoaders()) {
>             this.addCacheLoader(builder.loaders(), loader, manager)
>                 .async().read(loader.async())
>                 .singletonStore().read(loader.singletonStore())
>             ;
>         }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the infinispan-issues mailing list