use of io.mycat.proxy.reactor.MycatReactorThread in project Mycat2 by MyCATApache.
the class MySQLAPIRuntimeImpl method addPengdingJob.
@Override
public void addPengdingJob(MySQLJobCallback callback) {
MycatReactorThread thread = (MycatReactorThread) Thread.currentThread();
thread.addNIOJob(new NIOJob() {
@Override
public void run(ReactorEnvThread reactor) throws Exception {
callback.run();
}
@Override
public void stop(ReactorEnvThread reactor, Exception reason) {
callback.stop(reason);
}
@Override
public String message() {
return callback.message();
}
});
}
Aggregations