com.github.phantomthief.failover.impl.GcUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simple-failover Show documentation
Show all versions of simple-failover Show documentation
A simple failover library for Java
package com.github.phantomthief.failover.impl;
import java.lang.ref.PhantomReference;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.util.concurrent.ConcurrentHashMap;
/**
* @author huangli
* Created on 2019-12-30
*/
final class GcUtil {
private static ConcurrentHashMap, Runnable> refMap = new ConcurrentHashMap<>();
private static final ReferenceQueue