code: public PushOptions sort(final String field, final int direction) {
          if (sort != null) {
              throw new IllegalStateException("sortDocument can not be set if sort already is");
          }
          if (sortDocument == null) {
              sortDocument = new BasicDBObject();
          }
          sortDocument.put(field, direction);
          return this;
      }
docs: Sets the sort value for the update
  
  @param field     the field to sort by
  @param direction the direction of the sort
  @return this