Skip to content

Commit

Permalink
for #1205, refine javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Sep 1, 2018
1 parent 2723972 commit 73896c7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public ShardingExecuteEngine(final int executorSize) {
}

/**
* Execute all callbacks.
* Execute.
*
* @param inputs input values
* @param callback sharding execute callback
Expand All @@ -68,7 +68,7 @@ public <I, O> List<O> execute(final Collection<I> inputs, final ShardingExecuteC
}

/**
* Execute all callbacks.
* Execute.
*
* @param inputs input values
* @param firstCallback first sharding execute callback
Expand Down Expand Up @@ -120,7 +120,7 @@ private <O> List<O> getResults(final O firstResult, final Collection<ListenableF
}

/**
* execute all callbacks for group.
* Execute for group.
*
* @param inputGroups input groups
* @param callback sharding execute callback
Expand All @@ -134,7 +134,7 @@ public <I, O> List<O> groupExecute(final Collection<ShardingExecuteGroup<I>> inp
}

/**
* execute all callbacks for group.
* Execute for group.
*
* @param inputGroups input groups
* @param callback sharding execute callback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
*
* @author zhangliang
*
* @param <I> type of input value
* @param <O> type of output value
* @param <I> type of inputs value
* @param <O> type of outputs value
*/
public interface ShardingGroupExecuteCallback<I, O> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,32 +47,32 @@ public final class SQLExecuteTemplate {
* Execute.
*
* @param executeUnits execute units
* @param executeCallback execute callback
* @param callback execute callback
* @param <T> class type of return value
* @return execute result
* @throws SQLException SQL exception
*/
public <T> List<T> execute(final Collection<? extends StatementExecuteUnit> executeUnits, final SQLExecuteCallback<T> executeCallback) throws SQLException {
return execute(executeUnits, null, executeCallback);
public <T> List<T> execute(final Collection<? extends StatementExecuteUnit> executeUnits, final SQLExecuteCallback<T> callback) throws SQLException {
return execute(executeUnits, null, callback);
}

/**
* Execute.
*
* @param executeUnits execute units
* @param firstExecuteCallback first execute callback
* @param executeCallback execute callback
* @param callback execute callback
* @param <T> class type of return value
* @return execute result
* @throws SQLException SQL exception
*/
@SuppressWarnings("unchecked")
public <T> List<T> execute(final Collection<? extends StatementExecuteUnit> executeUnits,
final SQLExecuteCallback<T> firstExecuteCallback, final SQLExecuteCallback<T> executeCallback) throws SQLException {
final SQLExecuteCallback<T> firstExecuteCallback, final SQLExecuteCallback<T> callback) throws SQLException {
OverallExecutionEvent event = new OverallExecutionEvent(executeUnits.size() > 1);
ShardingEventBusInstance.getInstance().post(event);
try {
List<T> result = executeEngine.execute((Collection) executeUnits, firstExecuteCallback, executeCallback);
List<T> result = executeEngine.execute((Collection) executeUnits, firstExecuteCallback, callback);
event.setExecuteSuccess();
return result;
// CHECKSTYLE:OFF
Expand Down

0 comments on commit 73896c7

Please sign in to comment.