| | |
| | | import java.lang.reflect.Method; |
| | | import java.net.URL; |
| | | import java.net.URLClassLoader; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.Iterator; |
| | | import java.util.Vector; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Slf4j |
| | |
| | | } |
| | | } |
| | | public static synchronized void removeClassCache(String projectId) { |
| | | for (String key : classCache.keySet()) { |
| | | Iterator<String> iterator = classCache.keySet().iterator(); |
| | | while (iterator.hasNext()) { |
| | | String key = iterator.next(); |
| | | if (key.startsWith(projectId)) { |
| | | classCache.remove(key); |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public static synchronized void removeClassMethodCache(String projectId) { |
| | | for (String key : classMethodCache.keySet()) { |
| | | Iterator<String> iterator = classMethodCache.keySet().iterator(); |
| | | while (iterator.hasNext()) { |
| | | String key = iterator.next(); |
| | | if (key.startsWith(projectId)) { |
| | | classMethodCache.remove(key); |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | public static HashMap<String, Object> run(IAILModel model, Object[] paramsValueArray, String projectId) throws Exception { |
| | | public static synchronized HashMap<String, Object> run(IAILModel model, Object[] paramsValueArray, String projectId) throws Exception { |
| | | if (RSAUtils.checkLisenceBean().getCode() != 1) { |
| | | throw new SecurityException("Lisence 不可用!"); |
| | | } else if (model == null) { |