1 9 package javolution.realtime; 10 11 import javolution.util.FastMap; 12 13 26 public final class LocalContext extends Context { 27 28 32 final FastMap _references = new FastMap(); 33 34 37 LocalContext() { 38 } 39 40 43 public static void enter() { 44 LocalContext ctx = (LocalContext) push(LOCAL_CONTEXT_CLASS); 45 if (ctx == null) { 46 ctx = new LocalContext(); 47 push(ctx); 48 } 49 } 50 private static final Class LOCAL_CONTEXT_CLASS = new LocalContext().getClass(); 51 52 58 public static void exit() { 59 LocalContext ctx = (LocalContext) pop(); 60 ctx._references.clear(); 61 } 62 63 protected void dispose() { 65 } 67 } | Popular Tags |