41 |
|
// startup a monitor on this queue, every minute |
42 |
|
String queueName = _name + " PacketSorterQueue"; |
43 |
|
_queue.startMonitor(queueMonitorInterval*1000, queueName); |
44 |
< |
_hostMap = new HashMap(); |
45 |
< |
_allHostsList = new LinkedList(); |
44 |
> |
_hostMap = Collections.synchronizedMap(new HashMap()); |
45 |
> |
_allHostsList = Collections.synchronizedList(new LinkedList()); |
46 |
|
_logger.write(toString(), Logger.SYSINIT, "created"); |
47 |
|
} |
48 |
|
|
120 |
|
} |
121 |
|
else { |
122 |
|
// we don't, so create a list and put it in the map |
123 |
< |
LinkedList list = new LinkedList(); |
123 |
> |
List list = Collections.synchronizedList(new LinkedList()); |
124 |
|
list.add(dhQueue); |
125 |
|
_hostMap.put(host, list); |
126 |
|
} |
224 |
|
* A HashMap to store lists of Queue's (in the DataHandlers) |
225 |
|
* in a way that can be easily accessed when data comes in. |
226 |
|
*/ |
227 |
< |
private HashMap _hostMap; |
227 |
> |
private Map _hostMap; |
228 |
|
|
229 |
|
/** |
230 |
|
* A list specifically for a Queue's associated with DataHandlers |
231 |
|
* that want all host information. |
232 |
|
*/ |
233 |
< |
private LinkedList _allHostsList; |
233 |
> |
private List _allHostsList; |
234 |
|
|
235 |
|
//---STATIC ATTRIBUTES--- |
236 |
|
|