static <T> ActiveOperation.CompletedCallback<T> getCheckedCallback(final ActiveOperation.CompletedCallback<T> callback) { if(callback == null) { return getDefaultCallback(); } return callback; }
static <T> ActiveOperation.CompletedCallback<T> getCheckedCallback(final ActiveOperation.CompletedCallback<T> callback) { if(callback == null) { return getDefaultCallback(); } return 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. 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 * * @throws java.lang.IllegalStateException if an operation with the same id is already registered */ protected <T, A> ActiveOperation<T, A> registerActiveOperation(final Integer id, A attachment) { final ActiveOperation.CompletedCallback<T> callback = getDefaultCallback(); return registerActiveOperation(id, 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 * * @throws java.lang.IllegalStateException if an operation with the same id is already registered */ protected <T, A> ActiveOperation<T, A> registerActiveOperation(final Integer id, A attachment) { final ActiveOperation.CompletedCallback<T> callback = getDefaultCallback(); return registerActiveOperation(id, attachment, callback); }