public boolean commit(long batchId, int taskId, TransactionState state) {
        // Ingore any batches' ack when current state is NOT active
        if (batchId != TransactionCommon.INIT_BATCH_ID && !isActive())
            return false;

        String componentId = taskToComponentId.get(taskId);
        if (sourceTasks.containsKey(componentId)) {
            return commitSource(batchId, taskId, state);
        } else if (statefulTasks.containsKey(componentId)) {
            return commitStatefulBolt(batchId, taskId, state);
        } else {
            return false;
        }
    }
public boolean commit ( long batchId , int taskId , TransactionState state ) { if ( batchId != TransactionCommon . INIT_BATCH_ID && ! isActive ( ) ) return false ; String componentId = taskToComponentId . get ( taskId ) ; if ( sourceTasks . containsKey ( componentId ) ) { return commitSource ( batchId , taskId , state ) ; } else if ( statefulTasks . containsKey ( componentId ) ) { return commitStatefulBolt ( batchId , taskId , state ) ; } else { return false ; } }
@param batchId batch id
@param taskId task id
@param state state
@return true if current batch is done