@Service public class MongoDistributeImpl extends Object implements IDistribute
| 构造器和说明 |
|---|
MongoDistributeImpl(MongoLockRepo mongoLockRepo,
ElectionIdRepo electionIdRepo) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addElectionListener(String scene,
ElectionListener listener) |
long |
getNumber(String scene) |
void |
releaseLock(String scene,
String uniqId) |
String |
requireLock(String scene,
long time) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrequireLockpublic MongoDistributeImpl(@Autowired
MongoLockRepo mongoLockRepo,
@Autowired
ElectionIdRepo electionIdRepo)
public void addElectionListener(String scene, ElectionListener listener) throws Exception
addElectionListener 在接口中 IDistributeExceptionpublic String requireLock(String scene, long time) throws Exception
requireLock 在接口中 ILockExceptionpublic void releaseLock(String scene, String uniqId) throws Exception
releaseLock 在接口中 ILockExceptionpublic long getNumber(String scene) throws Exception
getNumber 在接口中 IDistributeExceptionCopyright © 2020 Shoothzj. All rights reserved.