code: private boolean isShardedCollection(DBCollection collection) {
  
          DB config = collection.getDB().getMongo().getDB("config");
          DBCollection configCollections = config.getCollection("collections");
  
          DBObject dbObject = configCollections.findOne(new BasicDBObject(MONGO_DEFAULT_ID, collection.getFullName()));
          return dbObject != null;
      }
docs: Is sharded collection.
  
  @param collection the collection
  @return the boolean