
package org.jeecg.modules.workFlow.flowlong.engine.scheduling;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * 任务执行锁接口
 *

 */
public class LocalLock implements JobLock {
    /**
     * 防重入锁
     */
    private static final Lock LOCAL_LOCK = new ReentrantLock();

    @Override
    public boolean tryLock() {
        return LOCAL_LOCK.tryLock();
    }

    @Override
    public void unlock() {
        LOCAL_LOCK.unlock();
    }
}
