Pada
Executive Member
Hi,
I'm looking for a way that I can schedule tasks in a multi-threaded Java environment without using a thread per task and I must be able to remove the scheduled task too.
Like my scenario is where I have multiple users connecting via TCP to like a MINA socket server and I want to be able to adjust login timeout, idle timeouts and a bunch of other timeouts individually per user.
I'm not sure if something like Quartz would work?
We need something that can handle say 1000 new timer events/s, where probably only 10/s would be fired due to the nature of it being like idle timeouts.
Currently we're having concurrency issues with our own schedule manager that we wrote, where like a user took too long to enter his log in credentials and just as we're processing it, the login timeout timer would fire and kill his connection before we responded.
Our current implementation makes use of a ConcurrentSkipListSet, where the events would be inserted in an ordered fashion based on their time (in ms) that they should fire.
We're running into concurrency issues like when an event is busy firing and then the user replied and we want to cancel the event.
Suggestions/help would be greatly appreciated!
I'm looking for a way that I can schedule tasks in a multi-threaded Java environment without using a thread per task and I must be able to remove the scheduled task too.
Like my scenario is where I have multiple users connecting via TCP to like a MINA socket server and I want to be able to adjust login timeout, idle timeouts and a bunch of other timeouts individually per user.
I'm not sure if something like Quartz would work?
We need something that can handle say 1000 new timer events/s, where probably only 10/s would be fired due to the nature of it being like idle timeouts.
Currently we're having concurrency issues with our own schedule manager that we wrote, where like a user took too long to enter his log in credentials and just as we're processing it, the login timeout timer would fire and kill his connection before we responded.
Our current implementation makes use of a ConcurrentSkipListSet, where the events would be inserted in an ordered fashion based on their time (in ms) that they should fire.
We're running into concurrency issues like when an event is busy firing and then the user replied and we want to cancel the event.
Suggestions/help would be greatly appreciated!