Package javax.cache.spi

Examples of javax.cache.spi.CachingProvider


        });
    }

    @Test
    public void test_execution_entryprocessor_with_backup_entry_processor() throws Exception {
        CachingProvider cachingProvider = HazelcastServerCachingProvider.createCachingProvider(hz1);
        CacheManager cacheManager = cachingProvider.getCacheManager();

        String cacheName = randomString();

        CompleteConfiguration<Integer, String> config =
                new MutableConfiguration<Integer, String>()
View Full Code Here


        });
    }

    @Test
    public void test_execution_entryprocessor_with_backup_entry_processor_null() throws Exception {
        CachingProvider cachingProvider = HazelcastServerCachingProvider.createCachingProvider(hz1);
        CacheManager cacheManager = cachingProvider.getCacheManager();

        String cacheName = randomString();

        CompleteConfiguration<Integer, String> config =
                new MutableConfiguration<Integer, String>()
View Full Code Here

        });
    }

    @Test
    public void test_execution_entryprocessor_with_backup_entry_processor_custom_backup() throws Exception {
        CachingProvider cachingProvider = HazelcastServerCachingProvider.createCachingProvider(hz1);
        CacheManager cacheManager = cachingProvider.getCacheManager();

        String cacheName = randomString();

        CompleteConfiguration<Integer, String> config =
                new MutableConfiguration<Integer, String>()
View Full Code Here

        System.out.println(" Remove Percentage: " + (100 - (PUT_PERCENTAGE + GET_PERCENTAGE)));

        final CacheConfig<String, Object> config = new CacheConfig<String, Object>();
        config.setTypes(String.class, Object.class);

        final CachingProvider cachingProvider = Caching.getCachingProvider();
        final CacheManager cacheManager = cachingProvider.getCacheManager();
        final Cache<String, Object> cache = cacheManager.createCache("default", config);

        ExecutorService es = Executors.newFixedThreadPool(THREAD_COUNT);
        for (int i = 0; i < THREAD_COUNT; i++) {
            es.submit(new Runnable() {
View Full Code Here

    private static final ILogger LOGGER = Logger.getLogger(HazelcastCachingProvider.class);

    private final CachingProvider delegate;

    public HazelcastCachingProvider() {
        CachingProvider cp = null;
        String providerType = System.getProperty(GroupProperties.PROP_JCACHE_PROVIDER_TYPE);
        if (providerType != null) {
            if ("client".equals(providerType)) {
                cp = createClientProvider();
            }
View Full Code Here

  @Test
  public void simpleAPITypeEnforcement() {

    //resolve a cache manager
    CachingProvider cachingProvider = Caching.getCachingProvider();
    CacheManager cacheManager = cachingProvider.getCacheManager();

    //configure the cache
    MutableConfiguration<String, Integer> config = new MutableConfiguration<>();
    config.setStoreByValue(true)
        .setTypes(String.class, Integer.class)
View Full Code Here

  @Test
  public void simpleAPITypeEnforcementUsingCaching() {

    //resolve a cache manager
    CachingProvider cachingProvider = Caching.getCachingProvider();
    CacheManager cacheManager = cachingProvider.getCacheManager();

    //configure the cache
    MutableConfiguration<String, Integer> config = new MutableConfiguration<>();
    config.setTypes(String.class, Integer.class)
        .setExpiryPolicyFactory(AccessedExpiryPolicy.factoryOf(ONE_HOUR))
View Full Code Here

  @Test
  public void simpleAPIWithGenericsAndNoTypeEnforcement() {

    //resolve a cache manager
    CachingProvider cachingProvider = Caching.getCachingProvider();
    CacheManager cacheManager = cachingProvider.getCacheManager();

    //configure the cache
    String cacheName = "sampleCache3";
    MutableConfiguration config = new MutableConfiguration<String, Integer>();
    config.setExpiryPolicyFactory(AccessedExpiryPolicy.factoryOf(ONE_HOUR))
View Full Code Here

  @Test
  public void simpleAPINoGenericsAndNoTypeEnforcement() {

    //resolve a cache manager
    CachingProvider cachingProvider = Caching.getCachingProvider();
    CacheManager cacheManager = cachingProvider.getCacheManager();

    //configure the cache
    String cacheName = "sampleCache";
    MutableConfiguration config = new MutableConfiguration();
    config.setExpiryPolicyFactory(AccessedExpiryPolicy.factoryOf(ONE_HOUR))
View Full Code Here

     */
    @Test
    public void simpleAPITypeEnforcementObject() {

        //resolve a cache manager
        CachingProvider cachingProvider = Caching.getCachingProvider();
        CacheManager cacheManager = cachingProvider.getCacheManager();

        //configure the cache
        MutableConfiguration<Object, Object> config = new MutableConfiguration<>();
        config.setTypes(Object.class, Object.class)
                .setExpiryPolicyFactory(AccessedExpiryPolicy.factoryOf(ONE_HOUR))
View Full Code Here

TOP

Related Classes of javax.cache.spi.CachingProvider

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.