m_DeviceList.put(tmpDeviceName, aDevice);
}
}
try {
DevicePolledList tmpPolledList = null;
if (!m_deviceListRef.containsKey(tmpDeviceName)) {
if (m_deviceListTable.isEmpty()) {
tmpPolledList = new DevicePolledList();
String tmpHashCode = String.valueOf(tmpPolledList.hashCode());
m_deviceListRef.put(tmpDeviceName, tmpHashCode);
m_deviceListTable.put(tmpHashCode, tmpPolledList);
}
else {
Enumeration<DevicePolledList> tmpEnumeration = m_deviceListTable.elements();
while (tmpEnumeration.hasMoreElements()) {
tmpPolledList = tmpEnumeration.nextElement();
if (tmpPolledList.size() < BindingTango.NB_DEVICE_MAX) {
break;
}
}
if (tmpPolledList.size() == BindingTango.NB_ATTR_MAX) {
tmpPolledList = new DevicePolledList();
String tmpHashCode = String.valueOf(tmpPolledList.hashCode());
synchronized (m_deviceListRef) {
m_deviceListRef.put(tmpDeviceName, tmpHashCode);
}
synchronized (m_deviceListTable) {
m_deviceListTable.put(tmpHashCode, tmpPolledList);
}
}
}
if (tmpPolledList != null) {
tmpPolledList.addDevice(aDevice);
}
}
}
catch (Exception e) {
}