Hrmm, I am not for sure, but this doesn't seem like it would work.  The ConcurrentHashMap doesn't guarantee any ordering and it seems this assume the iteration order will be the order the states should come in.  Maybe I am just misreading it though.

We shouldn't use the keySet iterator, it should use the entrySet iterator to prevent N additional hash lookups for the get invocations.

Also while fine it smells that these variables are defined as HashSet instead of Set.