All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.javajy.api.component.CacheManager Maven / Gradle / Ivy

The newest version!
package com.javajy.api.component;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

public class CacheManager {
    private static Map b = new HashMap();
    private static Map c = new HashMap();

    public CacheManager() {
    }

    public static String createToken(Object var0) {
        String var1 = b();
        if (var0 == null) {
            return null;
        } else {
            b.put(var1, var0);
            return var1;
        }
    }

    public static Object get(String var0) {
        return b.get(var0);
    }

    public static boolean verifyToken(String var0) {
        return b.containsKey(var0);
    }

    private static String b() {
        return UUID.randomUUID().toString();
    }

    public static void put(Integer var0, Object var1) {
        c.put(var0, var1);
    }

    public static Object get(Integer var0) {
        return c.get(var0);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy