Mercurial > hg > Database > Alice
comparison src/alice/topology/manager/keeparive/TaskExecuter.java @ 331:8266d7cfba7e
add comment
author | sugi |
---|---|
date | Thu, 03 Apr 2014 20:26:23 +0900 |
parents | d35ff0f588e8 |
children | 6b82dae5d537 |
comparison
equal
deleted
inserted
replaced
330:d35ff0f588e8 | 331:8266d7cfba7e |
---|---|
64 setKey(); | 64 setKey(); |
65 } | 65 } |
66 | 66 |
67 private synchronized void execTask(){ | 67 private synchronized void execTask(){ |
68 // ping or close | 68 // ping or close |
69 System.out.println("aaaa"); | |
70 if (nowTask.getType() == TaskType.PING) { | 69 if (nowTask.getType() == TaskType.PING) { |
71 System.out.println("bbb"); | |
72 ods.ping(nowTask.getManagerKey(), nowTask.getReturnKey()); | 70 ods.ping(nowTask.getManagerKey(), nowTask.getReturnKey()); |
73 TaskInfo task = new TaskInfo(TaskType.CLOSE); | 71 TaskInfo task = new TaskInfo(TaskType.CLOSE); |
74 task.setInfo(nowTask.getManagerKey(), 10 * 1000); | 72 task.setInfo(nowTask.getManagerKey(), 10 * 1000); |
75 ods.put("_TASKINFO", task); | 73 ods.put("_TASKINFO", task); |
76 new RespondPing(nowTask.getReturnKey()); | 74 new RespondPing(nowTask.getReturnKey()); |
77 } else if (nowTask.getType() == TaskType.CLOSE) { | 75 } else if (nowTask.getType() == TaskType.CLOSE) { |
78 // no response from the Remote DataSegment. So close this connection. | 76 // no response from the Remote DataSegment. So close this connection. |
79 //DataSegment.get(nowTask.getManagerKey()).close(); | 77 DataSegment.get(nowTask.getManagerKey()).close(); |
80 System.out.println("CLOSE"); | |
81 | |
82 nowTask.show(); | |
83 System.exit(0); | |
84 } | 78 } |
85 } | 79 } |
86 | 80 |
87 public synchronized void skip() { | 81 public synchronized void skip() { |
88 skipFlag = true; | 82 skipFlag = true; |