|
|
@ -3,6 +3,7 @@ package com.xxl.job.admin.core.util;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
|
|
|
import java.util.concurrent.ConcurrentMap;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* local cache tool
|
|
|
|
* local cache tool
|
|
|
@ -11,7 +12,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public class LocalCacheUtil {
|
|
|
|
public class LocalCacheUtil {
|
|
|
|
|
|
|
|
|
|
|
|
private static ConcurrentHashMap<String, LocalCacheData> cacheRepository = new ConcurrentHashMap<>();
|
|
|
|
private static ConcurrentMap<String, LocalCacheData> cacheRepository = new ConcurrentHashMap<>(); // 类型建议用抽象父类,兼容性更好;
|
|
|
|
private static class LocalCacheData{
|
|
|
|
private static class LocalCacheData{
|
|
|
|
private String key;
|
|
|
|
private String key;
|
|
|
|
private Object val;
|
|
|
|
private Object val;
|
|
|
|