Package com.atlassian.crowd.util
Class BatchResult<T>
java.lang.Object
com.atlassian.crowd.util.BatchResult<T>
- Direct Known Subclasses:
BatchResultWithIdReferences
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 TypeMethodDescriptionvoid
addFailure
(T entity) void
addFailures
(Collection<? extends T> entities) void
addSuccess
(T entity) void
addSuccesses
(Collection<? extends T> entities) int
int
boolean
boolean
static <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()
-