code: public synchronized void removeCommandPolling(final CommandImpl command) throws DevFailed {
          if (commandCacheMap.containsKey(command)) {
              final CommandCache cache = commandCacheMap.get(command);
              cache.stopRefresh();
              commandCacheMap.remove(command);
          } else if (extTrigCommandCacheMap.containsKey(command)) {
              extTrigCommandCacheMap.remove(command);
          } else if (command.getName().equalsIgnoreCase(DeviceImpl.STATE_NAME) && stateCache != null) {
              stateCache.stopRefresh();
              stateCache = null;
          } else if (command.getName().equalsIgnoreCase(DeviceImpl.STATUS_NAME) && statusCache != null) {
              statusCache.stopRefresh();
              statusCache = null;
          }
      }
docs: Remove polling of a command
  
  @param command
  @throws DevFailed