ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: Can I use the JCache API for distributed caches in Apache Ignite?
Date Tue, 26 Jan 2016 22:27:56 GMT
Hi Henrik,

JCache allows to provide provider-specific configuration when creating a
cache. I.e., you can do this:

    // Get or create a cache manager.
    CacheManager cacheMgr = Caching.getCachingProvider().getCacheManager();
    // This is an Ignite configuration object
    CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>();
    // Specify cache mode and/or any other Ignite-specific configuration
    // Create a cache based on configuration create above.
    Cache<Integer, String> cache = cacheMgr.createCache("a", cfg);

Also note that partitioned mode is actually the default one in Ignite, so
you are not required to specify it explicitly.


View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Can-I-use-the-JCache-API-for-distributed-caches-in-Apache-Ignite-tp2726p2731.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message