io.github.icodegarden.nutrient.lang.concurrent.lock.DatabaseReadWriteLockRepository Maven / Gradle / Ivy
package io.github.icodegarden.nutrient.lang.concurrent.lock;
import java.util.List;
import io.github.icodegarden.nutrient.lang.annotation.NotNull;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
*
* @author Fangfang.Xu
*
*/
public interface DatabaseReadWriteLockRepository {
public static final String TABLE_NAME = "distributed_read_write_lock";
void createRow(String lockName, String identifier, Long expireSeconds, String lockAt, boolean readType);
@NotNull
List listLockedDatas(String lockName, String nowStr);
@NotNull
List listLockedDataInterProcess(String lockName, String identifier, boolean readType, String nowStr);
int deleteRow(String lockName, String identifier);
@Getter
@Setter
@ToString
@AllArgsConstructor
class LockDO {
private String identifier;
private boolean readType;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy