Package com.xixibase.cache

Examples of com.xixibase.cache.CacheItem


    manager.initialize(serverlist);
   
    CacheClient cc = manager.createClient();
   
    cc.set("key", "value1");
    CacheItem item1 = cc.gets("key");
    System.out.println(item1.getValue());
   
    cc.set("key", "value2");
    CacheItem item2 = cc.gets("key");
    System.out.println(item2.getValue());

    cc.set("key", "value3", 0, item1.getCacheID());
    System.out.println(cc.get("key"));
   
    cc.set("key", "value4", 0, item2.getCacheID());
    System.out.println(cc.get("key"));

    cc.flush();
   
    manager.shutdown();
View Full Code Here


      List<CacheItem> cacheList = cc.multiGet(keys);
      if (cacheList != null) {
        Iterator<CacheItem> it = cacheList.iterator();
        int index = 0;
        while (it.hasNext()) {
          CacheItem item = it.next();
          map.put(keys.get(index++), (String)item.getValue());
        }
      } else {
        return null;
      }
    }
View Full Code Here

           
            byte[] buf = data.array();
            int[] objectSize = new int[1];
            try {
              Object obj = transCoder.decode(buf, flags, objectSize);
              CacheItem item = new CacheItem(
                  key,
                  cacheID,
                  expiration,
                  groupID,
                  flags,
View Full Code Here

TOP

Related Classes of com.xixibase.cache.CacheItem

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.