kuujo / vertigo

Flow-based programming for the Vert.x application platform.
Apache License 2.0
155 stars 24 forks source link

TimeOut Handlers #9

Closed andredasilvapinto closed 11 years ago

andredasilvapinto commented 11 years ago

Shouldn't AbstractExecutor.enqueue() timer handler use timeoutHandler instead of failHandler?

handlers.remove(id).timeoutHandler.handle(id);

I would also suggest changing DefaultHeartBeatMonitor.listen() argument and DefaultHeartBeatMonitor.AddressMonitor property name from failHandler to timeoutHandler. I know it is defined in AbstractCoordinator.doRegister and is a different kind of timeout handler, but I find the name more suitable than a generic "failHandler".

kuujo commented 11 years ago

Agree on the failHandler naming. Also, you are absolutely correct that the AbstractExecutor appears to be calling the wrong handler. Obviously I missed that when I added the timeoutHandler to the executors. No integration tests have been written for executor timeouts and such. Perhaps I should get on that to catch these types of issues.

andredasilvapinto commented 11 years ago

Thanks