/** * Register an active operation. The operation-id will be generated. * * @param attachment the shared attachment * @param callback the completed callback * @return the active operation */ protected <T, A> ActiveOperation<T, A> registerActiveOperation(A attachment, ActiveOperation.CompletedCallback<T> callback) { return registerActiveOperation(null, attachment, callback); }
/** * Register an active operation. The operation-id will be generated. * * @param attachment the shared attachment * @return the active operation */ protected <T, A> ActiveOperation<T, A> registerActiveOperation(A attachment) { final ActiveOperation.CompletedCallback<T> callback = getDefaultCallback(); return registerActiveOperation(attachment, callback); }
/** * Register an active operation with a specific operation id. * * @param id the operation id * @param attachment the shared attachment * @return the created active operation */ protected <T, A> ActiveOperation<T, A> registerActiveOperation(final Integer id, A attachment) { final ActiveOperation.CompletedCallback<T> callback = getDefaultCallback(); return registerActiveOperation(id, attachment, callback); }