public class ImportBatchStatus
extends java.lang.Object
ImportBatch
.Constructor and Description |
---|
ImportBatchStatus(ImportBatch batch)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addToCompleted(ProcessedImport task)
Updates the batch status to reflect that the specified import has
completed either successfully or with a failure depending on the
value returned by
ProcessedImport.succeeded() . |
boolean |
allProcessed()
Have all the imports in this batch been processed?
|
boolean |
allSucceeded()
Have all the imports in this batch been processed successfully?
|
ImportBatch |
batch() |
boolean |
equals(java.lang.Object x) |
java.util.Set<QueuedImport> |
failed() |
int |
hashCode() |
java.util.Set<QueuedImport> |
succeeded() |
public ImportBatchStatus(ImportBatch batch)
batch
- the batch to track.java.lang.NullPointerException
- if the argument is null
.public ImportBatch batch()
public void addToCompleted(ProcessedImport task)
ProcessedImport.succeeded()
.
This method will check that all the following conditions are true
:
t
,
then task.succeeded() == t.succeeded()
. In other words, you
can call this method multiple times for the same import task as long as
the specified import outcome
is
always the same.false
, then an exceptions is thrown and
the status is not updated.task
- the import.java.lang.NullPointerException
- if the argument is null
.java.lang.IllegalArgumentException
- if any of the above conditions are not
met.public boolean allProcessed()
true
for yes, false
for no.public boolean allSucceeded()
true
for yes, false
for no.public java.util.Set<QueuedImport> succeeded()
public java.util.Set<QueuedImport> failed()
public boolean equals(java.lang.Object x)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object