code: @Override
      public Set<String> findAllJobTypes() {
          return stream(collection.find().maxTime(500, TimeUnit.MILLISECONDS).spliterator(), false)
                  .map(doc -> doc.getString(ID))
                  .collect(toSet());
      }
docs: Returns all job types having state information.
  
  @return set containing job types.