/** * Get the current thread's ZoieContext to keep in the wrapper runnable so that * when the runnable is executed, the context can be set to be the same as the * invoking thread. * @param runnable */ public ZoieRunnable(Runnable runnable) { innerRunnable = runnable; ctx = ZoieContext.getContext(); }
/** * Get the current thread's ZoieContext to keep in the wrapper runnable so that * when the runnable is executed, the context can be set to be the same as the * invoking thread. * @param runnable */ public ZoieRunnable(Runnable runnable) { innerRunnable = runnable; ctx = ZoieContext.getContext(); } public ZoieContext getContext()
/** * Get the current thread's ZoieContext to keep in the wrapper runnable so that * when the runnable is executed, the context can be set to be the same as the * invoking thread. * @param runnable */ public ZoieRunnable(Runnable runnable) { innerRunnable = runnable; ctx = ZoieContext.getContext(); }
@Override protected void afterExecute(Runnable r, Throwable t) { ZoieContext.getContext().clear(); super.afterExecute(((ZoieRunnable) r).innerRunnable, t); }
@SuppressWarnings("unchecked") public E get() { return (E) ZoieContext.getContext().getReaderContext(_reader).get(_key); } }
@SuppressWarnings("unchecked") public E get() { return (E) ZoieContext.getContext().getReaderContext(_reader).get(_key); } }
@Override protected void afterExecute(Runnable r, Throwable t) { ZoieContext.getContext().clear(); super.afterExecute(((ZoieRunnable) r).innerRunnable, t); }
@SuppressWarnings("unchecked") public E get() { return (E) ZoieContext.getContext().getReaderContext(_reader).get(_key); } }
@Override protected void afterExecute(Runnable r, Throwable t) { ZoieContext.getContext().clear(); super.afterExecute(((ZoieRunnable)r).innerRunnable, t); }
public void set(E value) { ZoieContext.getContext().getReaderContext(_reader).set(_key, value); }
public void set(E value) { ZoieContext.getContext().getReaderContext(_reader).set(_key, value); }
public void set(E value) { ZoieContext.getContext().getReaderContext(_reader).set(_key, value); }