com.aol.micro.server.dist.lock.DistributedLockManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of micro-dist-lock Show documentation
Show all versions of micro-dist-lock Show documentation
Opinionated rest microservices
package com.aol.micro.server.dist.lock;
import lombok.Getter;
public class DistributedLockManager {
private final DistributedLockService distributedLockService;
@Getter
private final String key;
public DistributedLockManager(DistributedLockService distributedLockService, String lockKey) {
this.distributedLockService = distributedLockService;
this.key = lockKey;
}
public boolean isMainProcess() {
return distributedLockService.tryLock(key);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy