服务热线:13616026886

技术文档 欢迎使用技术文档,我们为你提供从新手到专业开发者的所有资源,你也可以通过它日益精进

位置:首页 > 技术文档 > JAVA > 新手入门 > 基础入门 > 查看文档

[推荐]一位scjder(153/155)的design details


  design details :
  1. data layer :
   data class is implemented as a singleton pattern .
   (only one exists per vm) .
   defined a new lockmanager for locking / unlocking methods .
   also a singleton.
  
   changed the signature of the lock / unlock methods to
  track the owner of the lock by clientid passed from the
  client.
  
   locking scheme checks for the following :
   a. before performing full database lock, check if database already locked by another client,
   b. before record unlocking or full database unlock, check if the clientid is the same as the owner of the lock.
   c. before full database unlock, check if the database is locked in the first place.
  2. server layer
   adapter pattern .
   multithreading implementation.
  3. client layer :
   factory , mediator
  
  4. other points :
  used rmi . modified data class. used multithreaded server design .
   only write locks (no read locks) .

扫描关注微信公众号