문제

I have a P2P application coded by LiteSoft.org. I am looking to implement a leader election system within this application. Before I can even start that, I have to have a fault tolerance system that will be consisted of sending requests to a peer, in this case the coordinator, to check if he is still responding. How could I implement a timer system to send out requests?

도움이 되었습니까?

해결책

If I'm understanding your question correctly you want to repeatedly perform the same action over and over on a schedule? Check out the Executor services. I think this will be what you are looking for: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top