Domestic   that  seat  city  City  behalf  pregnant  to  power  rate  high ?

Micro Signal █ █ 137 ★ 1009 ★ 7773 ████ surrogate donor egg IVF selected from gender ██████ ████ tube package boy born ████ ████ surrogate surrogate package boy born ██ █ ██ sex surrogate choose IVF surrogacy boy █████ ███

Distributed Synchronize distributed synchronization components

  1. Distributed Lock.
  2. Netty long connection based implementation.
  3. Custom protocol, built-in queue, performance than redis lock.
  4. Service off the assembly line immediately perceive, without waiting for a timeout.
  5. Support elegant closed.
  6. Distributed Lock Redis avoid defects

Start the server

java -jar -server dsync-dominate-xxx.jar

Jar maven can start the download, or download the source code  mvn package available.

Distributed Lock DLock

  1. Add dependent
<dependency>
  <groupId>cn.cyejing</groupId>
 <artifactId>dsync-toolkit</artifactId> </dependency>
  1. Instructions
Config config = Config.config().host("localhost").port(4843); //配置服务端地址 DSync dSync = DSync.create(config); DLock lock = dSync.getLock();  try {  lock.lock("adder");  //Do Something } finally {  lock.unlock(); }

Guess you like

Origin www.cnblogs.com/jixdaiyun/p/10927729.html