リエントラント性とは、スレッドがロックを保持している場合に再びロックを要求することであり、1つのロックが同じスレッドの複数回のロックをサポートしている場合、このロックはリエント可能である.例えばJava言語にReentrantLockがあるのは再ロック可能です.Redis分散ロックが再読み込みをサポートする場合は、スレッドのThreadlocal変数を使用して現在ロックを保持しているカウントを格納するクライアントのsetメソッドをパッケージする必要があります.
コードは次のとおりです.
public class RedisWithReentrantLock {
private ThreadLocal