提交 802ed4ce 编写于 作者: oldratlee's avatar oldratlee 🔥

improve javadoc

上级 37bc57e8
...@@ -4,22 +4,20 @@ import java.util.Map; ...@@ -4,22 +4,20 @@ import java.util.Map;
import java.util.TimerTask; import java.util.TimerTask;
/** /**
* {@link MtContextTimerTask} decorate {@link TimerTask}, so as to get @{@link MtContextThreadLocal} * {@link MtContextTimerTask} decorate {@link TimerTask}, so as to get {@link MtContextThreadLocal}
* and transmit it to the time of {@link Runnable} execution, needed when use {@link Runnable} to thread pool. * and transmit it to the time of {@link MtContextTimerTask} execution, needed when use {@link MtContextTimerTask} to {@link java.util.TimerTask}.
* <p/> * <p/>
* Use factory method {@link #get(TimerTask)} to create instance. * Use factory method {@link #get(TimerTask)} to create instance.
* <p/> * <p/>
* Use {@link java.util.concurrent.ScheduledThreadPoolExecutor} instead {@link java.util.Timer}.
* <p/>
* <b>NOTE:</b> * <b>NOTE:</b>
* The {@link MtContextTimerTask} make the the method {@link TimerTask#scheduledExecutionTime()} of * The {@link MtContextTimerTask} make the the method {@link TimerTask#scheduledExecutionTime()} in
* the origin {@link TimerTask} lose effectiveness! * the origin {@link TimerTask} lose effectiveness!
* *
* @author ding.lid * @author ding.lid
* @see java.util.Timer * @see java.util.Timer
* @see TimerTask * @see TimerTask
* @since 0.9.1 * @since 0.9.1
* @deprecated Use {@link MtContextRunnable}, {@link java.util.concurrent.ScheduledExecutorService} instead of timer * @deprecated Use {@link MtContextRunnable}, {@link java.util.concurrent.ScheduledExecutorService} instead of {@link java.util.Timer}, {@link java.util.TimerTask}.
*/ */
@Deprecated @Deprecated
public final class MtContextTimerTask extends TimerTask { public final class MtContextTimerTask extends TimerTask {
......
...@@ -32,6 +32,7 @@ public class MtContextTransformer implements ClassFileTransformer { ...@@ -32,6 +32,7 @@ public class MtContextTransformer implements ClassFileTransformer {
private static final String THREAD_POOL_CLASS_FILE = "java.util.concurrent.ThreadPoolExecutor".replace('.', '/'); private static final String THREAD_POOL_CLASS_FILE = "java.util.concurrent.ThreadPoolExecutor".replace('.', '/');
private static final String SCHEDULER_CLASS_FILE = "java.util.concurrent.ScheduledThreadPoolExecutor".replace('.', '/'); private static final String SCHEDULER_CLASS_FILE = "java.util.concurrent.ScheduledThreadPoolExecutor".replace('.', '/');
private static final String TIMER_TASK_CLASS_FILE = "java.util.TimerTask".replace('.', '/');
private static String toClassName(String classFile) { private static String toClassName(String classFile) {
return classFile.replace('/', '.'); return classFile.replace('/', '.');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册