Domanda

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?

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top