org.rx.core.Locker Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rxlib Show documentation
Show all versions of rxlib Show documentation
A set of utilities for Java
package org.rx.core;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.rx.bean.WeakIdentityMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantLock;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class Locker {
public static final Locker INSTANCE = new Locker();
//key1: ref, key2: key
final Map