code: public void merge(Set<Integer> deviceListUpdate) {
          inactiveDevices.addAll(activeDevices);
          activeDevices.clear();
          activeDevices.addAll(deviceListUpdate);
          inactiveDevices.removeAll(activeDevices);
      }
docs: Merge a device list update into the CachedDeviceList.
  The source code should be self explanatory.
  
  @param deviceListUpdate received device list update