Class EhBlockingCache

java.lang.Object
org.mybatis.caches.ehcache.AbstractEhcacheCache
org.mybatis.caches.ehcache.EhBlockingCache
All Implemented Interfaces:
org.apache.ibatis.cache.Cache

public class EhBlockingCache extends AbstractEhcacheCache
Cache implementation backed by Ehcache 3 that provides basic blocking semantics.

In Ehcache 2 this class used BlockingCache to acquire per-key locks and prevent cache stampedes. Ehcache 3 does not provide an equivalent decorator, so blocking must be provided by the caller (e.g. by wrapping this cache with BlockingCache).

Author:
Iwao AVE!
  • Constructor Details

    • EhBlockingCache

      public EhBlockingCache(String id)
      Instantiates a new eh blocking cache.
      Parameters:
      id - the id
  • Method Details