First Commit - Source Code from Reply

This commit is contained in:
vincenzofariello
2024-05-13 12:54:14 +02:00
parent 73e32a5020
commit a15aee1f08
11184 changed files with 1065913 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
package testUtil;
import java.util.*;
public class TestProcessCache {
private static TestProcessCache onlyInstance;
private HashMap cache = new HashMap();
public static final int XML=1;
//public static final int SID_IN=2;//?? SISTEMA ELIMINATO
public static final int MSP_IN=3;//??
public static final int MSC_IN=4;//??
public static final int BIT_IN=5;//??
public static final int MSISDN=6;
public static final int IDRICHIESTA=7;
public static final int HZ=8;
public static final int MSP_EXT_IN=9;
public static final int TISCALI_IN=10;
public static final int MSS=11;
public static final int IDREQINFOBUS=12;
public static final int HZ_PITAGORA_IN=13;
private TestProcessCache() {
}
public static synchronized TestProcessCache getInstance() {
if (onlyInstance==null) {
onlyInstance = new TestProcessCache();
}
return onlyInstance;
}
public synchronized void addItem(int id,Object o) {
Integer iID = new Integer(id);
if (cache.containsKey(iID)) {
ArrayList a = (ArrayList)cache.get(iID);
a.add(o);
}
else {
ArrayList a = new ArrayList();
a.add(o);
cache.put(iID,a);
}
}
public synchronized ArrayList getItem(int id) {
Integer iID = new Integer(id);
ArrayList a = (ArrayList)cache.get(iID);
return a;
}
public synchronized void clear() {
cache.clear();
}
}