TEZ-575. Change ID classes to be thread safe. (sseth)