摘要:
前文一个ID生成器的确简单,不能解决并发带来的重复性问题。这里完整地写一个ID生成器。其中做了一些并发问题的处理。原理:获取系统时间,并在其后加上一个随机数sample:将IdentityGenerator实例化后可直接获取Embacle.Identity.IdentityGenerator ig = new Embacle.Identity.IdentityGenerator();long id... 阅读全文
posted @ 2005-09-09 22:16 平淡人生 阅读(2937) 评论(0) 推荐(0) 编辑