Package com.atlassian.crowd.util
Class BatchResult<T>
java.lang.Object
com.atlassian.crowd.util.BatchResult<T>
A batch mutation operation result representing the collection of entities
that were successfully processed and the collection of entities that failed
processing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFailure(T entity) voidaddFailures(Collection<? extends T> entities) voidaddSuccess(T entity) voidaddSuccesses(Collection<? extends T> entities) intintbooleanbooleanstatic <T,V> BatchResult<V> transform(BatchResult<T> batchResult, Function<T, V> transformer) static <T,V, K extends BatchResult<V>>
Ktransform(BatchResult<T> batchResult, Function<T, V> transformer, Supplier<K> supplier)
-
Constructor Details
-
BatchResult
public BatchResult(int totalEntities)
-
-
Method Details
-
transform
public static <T,V, K transformK extends BatchResult<V>> (BatchResult<T> batchResult, Function<T, V> transformer, Supplier<K> supplier) -
transform
public static <T,V> BatchResult<V> transform(BatchResult<T> batchResult, Function<T, V> transformer) -
addSuccess
-
addSuccesses
-
addFailure
-
addFailures
-
hasFailures
public boolean hasFailures() -
hasSuccesses
public boolean hasSuccesses() -
getTotalAttempted
public int getTotalAttempted() -
getSuccessfulEntities
-
getFailedEntities
-
getTotalSuccessful
public int getTotalSuccessful()
-