Third party cache adapter responsible for handling put and get cache operations for concrete third party cache such as infinispan or coherence. Each TPCacheAdapter is registered per type of PersistentEntity via TPCacheAdapterRepository.
Current API does not yet provide bulk operations because the rest of the engine is not bulk-optimized.
Transactional semantics: depending on the concrete third-party cache capabilities and the presence of JTA transaction the implementation might perform the write operations at the commit rather than when a cacheEntry(java.io.Serializable, Object) is called.
Concurrency: each TPCacheAdapter
must be thread-safe.
Type Params | Return Type | Name and description |
---|---|---|
|
void |
cacheEntry(java.io.Serializable key, T entry) Stores a cached entry in a synchronous manner. |
|
T |
getCachedEntry(java.io.Serializable key) Returns the stored value for the specified key. |
Stores a cached entry in a synchronous manner.
Transactional semantics: depending on the concrete third-party cache capabilities and the presence of JTA transaction, for network optimization reasons the implementation might perform the actual cache cluster update operations at the commit rather than when a cacheEntry(java.io.Serializable, Object) is called.
In cases when there is no transaction or no transactional support by the implementation, if there are any problems storing the entry the caller is notified about it via exception in the calling thread; also, if this method returns successfully it means that the logistics of putting the specified value in the cache are fully done.
key
- the entry keyentry
- the entryReturns the stored value for the specified key.
key
- the entry key