Package cn.bran.play

Examples of cn.bran.play.CachedItemStatus


    renderText(x);
//    System.out.println(x);
  }
 
  public static void testCachedItemStatus() {
    CachedItemStatus cis = new CachedItemStatus(-1);
    Cache.safeAdd(CIS, cis, "10s");
    CachedItemStatus o = (CachedItemStatus) Cache.get(CIS);
    if(o.isExpired())
      renderText("good to know..");
    else
      renderText("bad to know..");
     
  }
View Full Code Here


      renderText("bad to know..");
     
  }
 
  public static void testCachedRenderResult() {
    CachedItemStatus cis = new CachedItemStatus(0);
    HashMap<String, String> headers = new HashMap<String, String>();
    RenderResult rr = new RenderResult(headers, new StringBuilder(), 123);
    CachedRenderResult crr = new CachedRenderResult(cis, rr);
    Cache.safeAdd("crr", crr, "10s");
    crr = (CachedRenderResult) Cache.get("crr");
View Full Code Here

    renderText(x);
//    System.out.println(x);
  }
 
  public static void testCachedItemStatus() {
    CachedItemStatus cis = new CachedItemStatus(-1);
    Cache.safeAdd(CIS, cis, "10s");
    CachedItemStatus o = (CachedItemStatus) Cache.get(CIS);
    if(o.isExpired())
      renderText("good to know..");
    else
      renderText("bad to know..");
     
  }
View Full Code Here

      renderText("bad to know..");
     
  }
 
  public static void testCachedRenderResult() {
    CachedItemStatus cis = new CachedItemStatus(0);
    HashMap<String, String> headers = new HashMap<String, String>();
    RenderResult rr = new RenderResult(headers, new StringBuilder(), 123);
    CachedRenderResult crr = new CachedRenderResult(cis, rr);
    Cache.safeAdd("crr", crr, "10s");
    crr = (CachedRenderResult) Cache.get("crr");
View Full Code Here

TOP

Related Classes of cn.bran.play.CachedItemStatus

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.