Java集成各種cache組件 multicache4j

jopen 12年前發布 | 28K 次閱讀 Java 緩存組件

multicache4j用于為Java集成各種cache組件:

  • 方便集成各種remote cache
    • memcached (支持組件spymemcached)
    • memcacheq (支持組件spymemcached)
    • memcachedb (支持組件spymemcached)
    • ttserver (支持組件spymemcached, ttserverclient)
    • redis (支持組件jedis)
  • 方便集成各種local cache
    • ehcache
  • 基于對象池技術管理客戶端連接對象,網絡斷開能夠自動重連
  • 基于Pattern Mapping進行哈希映射
  • 支持remote cache和local cache的混合緩存
  • 支持local cache的單獨使用
  • multi cache (remote + local, or remote , or local):混合使用遠程與本地Cache
適用場景:單點應用+集群Cache
MultiCacheFactory.getInstance().set("foo", "bar");  
MultiCacheFactory.getInstance().get("foo");
  • remote cache:單獨使用遠程Cache
適用場景:多點應用+集群Cache
RemoteCacheFactory.getInstance().set("foo", "bar");  RemoteCacheFactory.getInstance().get("foo");  
RemoteCacheFactory.getInstance().del("foo");
  • local cache:單獨使用本地Cache
適用場景:單點應用/多點應用
LocalCacheFactory.getInstance().set("foo", "bar");  
LocalCacheFactory.getInstance().get("foo");

項目主頁:http://www.baiduhome.net/lib/view/home/1324813123124

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!