Questions tagged [jcache]

JCACHE :JSR 107- Java Temporary Caching API. Specifies API and semantics for temporary, in-memory caching of Java objects, including object creation, shared access, spooling, invalidation, and consistency across JVM's. source: https://jcp.org/en/jsr/detail?id=107

Introduction

Cache is the API being defined in JSR107. It defines a standard Java Caching API for use by developers and a standard SPI ("Service Provider Interface") for use by implementers.

Maven Dependency:

<dependency>
    <groupId>javax.cache</groupId>
    <artifactId>cache-api</artifactId>
    <version>1.0.0</version>
</dependency>

Gradle dependency:

compile 'javax.cache:cache-api:1.0.0'

The specification is available online.

184 questions
0
votes
1 answer

key type and value type of an existing Jcache

Is there any way I can get the underlying key and value type definition of the cache that is created by some other code? At this point of time I only know the cache name. I don't have any other information about how the cache was created. The cache…
Pramod Kishore
  • 307
  • 2
  • 8
0
votes
1 answer

Hazelcast not injecting spring dependencies

I'm using hazelcast 3.8.5 as the store for jcache. It appears hazelcast is not injecting SpringAware dependencies into the CacheLoader. I took a peek at AbstractCacheRecordStore and it seems like only Hazelcast InstanceAware dependencies are…
Pschmeltz
  • 140
  • 1
  • 8
0
votes
1 answer

How can I configure custom Serializers / Copiers in XML for JSR-107 (JCache) with Ehcache?

I have a question concerning JCache / Ehcache XML configuration. I'm using the JSR 107 Cache Annotations CDI Reference Implementation together with Ehcache. I want to annotate specific methods with @CacheResult, so that the result of these methods…
0
votes
1 answer

Wildfly 10 Infinispan JCache: @CacheResult causes "Member of array type or annotation type must be annotated @NonBinding"

I'm trying to use the Infinispan JCache annotations within Wilfly 10. My Wildfly installation has the Wildfly-Camel extension (http://wildfly-extras.github.io/wildfly-camel/). I would like to use method level caching: @CacheResult public Connector…
balazs
  • 51
  • 4
0
votes
1 answer

Hazelcast JCache predicate

Previously I used Hazelcast Java API and was able to do predicate to filter on result return. Currently, as we are moving towards portability of IMDG, I used JCache API. However, i did not manage to find anything related that will allow me to do…
Cheng
  • 171
  • 3
  • 14
0
votes
1 answer

How Apache Ignite in embedded mode with Off Heap Storage works?

I'm thinking of replacing custom built mechanism of storing key-value pair in off-heap storage(using Java NIO) with Ignite embedded mode. I don't need to share the key-value store with any other instance of the application. Is Apache Ignite in…
jayesh
  • 367
  • 3
  • 15
0
votes
1 answer

Testing jCache with Hazelcast Provider

How can I achieve unit tests for caching using jCache and HazelcastProvider? Currently I'm getting this error: Caused by: java.lang.IllegalStateException: Unable to connect to any address in the config! The following addresses were tried:…
Forin
  • 1,549
  • 2
  • 20
  • 44
0
votes
1 answer

How Spring Boot autoconfigures the JCache when there is no JCache configuration file entry in spring.factories file?

I am new to spring boot project. Currently I am working on a project with spring boot, Jcache with ehcache implementation. I am trying to understand how spring boot autoconfigures the Cache Framework. I did my own research and identified spring boot…
Madhu
  • 552
  • 2
  • 10
  • 23
0
votes
0 answers

Google App Engine - Jcache Being Evicted Often

I have setup a Memcache using the JCache API to interface with it. The cache is built as follows: import javax.cache.Cache; import javax.cache.CacheException; import javax.cache.CacheManager; TreeMap name2Id =…
Jake88
  • 955
  • 1
  • 19
  • 39
0
votes
3 answers

How to extend functionality of expiry in ehCache 3.0

I am using EhCache core 3.0. It internally uses BaseExpiry and Eh107Expiry class to check whether cache is expired or not. These classes implement Expiry interface. My query is, can we extend methods which are used to check whether cache is expired…
0
votes
1 answer

WildFly 10, JCache - method caching

i have simple application using Spring Boot. I wanted allow method caching with JSR107 - JCache. So with help of tutorial i put together this code : @CacheResult(cacheName = "testpoc") public Country getCountry(Integer id){ …
Mato.Duris
  • 253
  • 1
  • 4
  • 15
0
votes
1 answer

how to cache other methods from the same class?

I'm using Ehcache implementation of JCache. Lets say, I've class Test. In this class I've two methods: methodA and methodB. methodB has annotation @CacheResult(cacheName = "methodB"). From this informations you would guess that I'd like to have…
deem
  • 1,252
  • 1
  • 19
  • 38
0
votes
1 answer

Where to find google app engine JCache dependencies

The JCache documentation https://cloud.google.com/appengine/docs/java/memcache/usingjcache describes how to use the api, however there is no mention of where to find the dependencies. I guessed on javax.cache
Andrew
  • 716
  • 1
  • 8
  • 19
0
votes
2 answers

Can I use the JCache API for distributed caches in Apache Ignite?

I would like to configure a distributed cache with Apache Ignite using the JCache API (JSR107, javax.cache). Is this possible? The examples I have found either create a local cache with the JCache API or create a distributed cache (or datagrid)…
PeakCode
  • 130
  • 7
0
votes
1 answer

How to configure Hazelcast using JCache programmatically and using writw behind?

I'm trying to add to the current implementation of the app I'm working on a JCache compliant technology. At the moment, I've been able to use Apache Ignite and have it working with a couple of caches using an implementation of a cache store to read…
Juan Vega
  • 1,030
  • 1
  • 16
  • 32