code: private static <T> Observable<Boolean> commitOrRollbackOnNext(final boolean isCommit,
              final Database db, Observable<T> source) {
          return source.concatMap(new Func1<T, Observable<Boolean>>() {
              @Override
              public Observable<Boolean> call(T t) {
                  if (isCommit)
                      return db.commit();
                  else
                      return db.rollback();
              }
          });
      }
docs: Emits true for commit and false for rollback.
  
  @param isCommit
  @param db
  @param source
  @return