Mercurial > hg > Database > Christie
view src/main/java/christie/topology/manager/keepalive/RespondPing.java @ 74:e2ce8038815a
fix FileParser
author | akahori |
---|---|
date | Wed, 05 Sep 2018 09:43:22 +0900 |
parents | fd944876257b |
children |
line wrap: on
line source
package christie.topology.manager.keepalive; import christie.annotation.Take; import christie.codegear.CodeGear; import christie.codegear.CodeGearManager; public class RespondPing extends CodeGear{ @Take RespondData respondData; // private long pingedTime = System.currentTimeMillis(); @Override public void run(CodeGearManager cgm) { TaskExecuter exec = TaskExecuter.getInstance(); synchronized (exec){ //System.out.print("ping from "+d.from); //System.out.println(" Recieved time "+(d.time - pingedTime)); TaskInfo task = new TaskInfo(TaskType.CLOSE); task.setInfo(respondData.from, null, 0); if (!exec.compareAndSkip(task)){ // case: remove task is still in the waiting queue. getLocalDGM().put("_REMOVETASK",task); new RemoveTask(); } } } }