Please add javadoc. Is it thread safe?