All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.andy.idempotent.lock.DistributedLockService Maven / Gradle / Ivy

Go to download

A simple idempotent component that addresses the prevention of duplicate submissions, duplicate notifications, and duplicate transaction compensation.

There is a newer version: 2.1.0
Show newest version
package com.andy.idempotent.lock;


/**
 * 分布式锁接口
 * @author andy
 *
 */
public interface DistributedLockService {

    public T doWithLock(String bizLockName,LockCallback lockCallback);
    
    public interface LockCallback{
        /**
         * 锁定期间用户要执行的业务逻辑
         * @throws Throwable 
         */
        public T doBiz() throws Throwable;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy