public class BatchInterrupted extends Element implements IBatchInterrupted
Modifier and Type | Field and Description |
---|---|
static AttributeKey<ContentType> |
CONTENT_TYPE
The MIME type of the content of this element.
|
static AttributeKey<java.lang.Integer> |
ERROR_COUNT
The number of entries for which processing failed.
|
static ElementKey<java.lang.String,BatchInterrupted> |
KEY
The key for this element.
|
static AttributeKey<java.lang.String> |
REASON
The reason.
|
static AttributeKey<java.lang.Integer> |
SKIPPED_COUNT
The number of entries parsed but not processed.
|
static AttributeKey<java.lang.Integer> |
SUCCESS_COUNT
The number of entries processed successfully.
|
static AttributeKey<java.lang.Integer> |
TOTAL_COUNT
The number of entries that were parsed.
|
Constructor and Description |
---|
BatchInterrupted()
Default mutable constructor.
|
BatchInterrupted(java.lang.String reason,
int totalCount,
int successCount,
int errorCount)
Creates and initializes a BatchInterrupted object.
|
BatchInterrupted(java.lang.Throwable cause,
int totalCount,
int successCount,
int errorCount)
Creates and initializes a BatchInterrupted object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getContent()
Returns the error message explaining what went wrong while processing the
request.
|
ContentType |
getContentType()
Returns the MIME type of the content of this element.
|
int |
getErrorCount()
Returns the number of entries for which processing failed.
|
java.lang.String |
getReason()
Returns the reason.
|
int |
getSkippedCount()
Returns the number of entries parsed but not processed.
|
int |
getSuccessCount()
Returns the number of entries processed successfully.
|
int |
getTotalCount()
Returns the number of entries that were parsed.
|
boolean |
hasContent()
Returns whether it has the error message explaining what went wrong while
processing the request.
|
boolean |
hasContentType()
Returns whether it has the MIME type of the content of this element.
|
boolean |
hasErrorCount()
Returns true if the error count exists.
|
int |
hashCode() |
boolean |
hasReason()
Returns whether it has the reason.
|
boolean |
hasSkippedCount()
Returns whether it has the number of entries parsed but not processed.
|
boolean |
hasSuccessCount()
Returns whether it has the number of entries processed successfully.
|
boolean |
hasTotalCount()
Returns whether it has the number of entries that were parsed.
|
static void |
registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
|
BatchInterrupted |
setContent(java.lang.String content)
Sets the error message explaining what went wrong while processing the
request.
|
BatchInterrupted |
setContentType(ContentType contentType)
Sets the MIME type of the content of this element.
|
BatchInterrupted |
setErrorCount(java.lang.Integer errorCount)
Sets the number of entries for which processing failed.
|
BatchInterrupted |
setReason(java.lang.String reason)
Sets the reason.
|
BatchInterrupted |
setSkippedCount(java.lang.Integer skippedCount)
Sets the number of entries parsed but not processed.
|
BatchInterrupted |
setSuccessCount(java.lang.Integer successCount)
Sets the number of entries processed successfully.
|
BatchInterrupted |
setTotalCount(java.lang.Integer totalCount)
Sets the number of entries that were parsed.
|
java.lang.String |
toString() |
addElement, addElement, addElement, clear, createElement, createElement, getAttributeCount, getAttributeIterator, getAttributeIterator, getAttributeValue, getAttributeValue, getDefaultKey, getElement, getElement, getElementCount, getElementId, getElementIterator, getElementIterator, getElementKey, getElements, getElements, getElementSet, getElementSet, getElementValue, getElementValue, getTextValue, getTextValue, hasAttribute, hasAttribute, hasElement, hasElement, hasTextValue, isLocked, lock, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, visit
public static final ElementKey<java.lang.String,BatchInterrupted> KEY
public static final AttributeKey<ContentType> CONTENT_TYPE
public static final AttributeKey<java.lang.Integer> ERROR_COUNT
public static final AttributeKey<java.lang.String> REASON
public static final AttributeKey<java.lang.Integer> SKIPPED_COUNT
public static final AttributeKey<java.lang.Integer> SUCCESS_COUNT
public static final AttributeKey<java.lang.Integer> TOTAL_COUNT
public BatchInterrupted()
public BatchInterrupted(java.lang.String reason, int totalCount, int successCount, int errorCount)
reason
- exception that caused batch processing to stoptotalCount
- number of entries parsed so far, note that
it is to be expected that totalCount >= successCount + errorCount
successCount
- number of entries processed successfully so farerrorCount
- number of entries rejected so farjava.lang.IllegalArgumentException
- if the total count is less than
successCount - errorCountpublic BatchInterrupted(java.lang.Throwable cause, int totalCount, int successCount, int errorCount)
cause
- exception that caused batch processing to stoptotalCount
- number of entries parsed so far, note that
it is to be expected that totalCount >= successCount + errorCount
successCount
- number of entries processed successfully so farerrorCount
- number of entries rejected so farpublic static void registerMetadata(MetadataRegistry registry)
public java.lang.String getContent()
getContent
in interface IBatchInterrupted
public BatchInterrupted setContent(java.lang.String content)
content
- error message explaining what went wrong while processing
the request or null
to resetpublic boolean hasContent()
public ContentType getContentType()
getContentType
in interface IBatchInterrupted
public BatchInterrupted setContentType(ContentType contentType)
contentType
- MIME type of the content of this element or
null
to resetpublic boolean hasContentType()
public int getErrorCount()
getErrorCount
in interface IBatchInterrupted
public BatchInterrupted setErrorCount(java.lang.Integer errorCount)
errorCount
- number of entries for which processing failed or
null
to resetpublic boolean hasErrorCount()
public java.lang.String getReason()
getReason
in interface IBatchInterrupted
public BatchInterrupted setReason(java.lang.String reason)
reason
- reason or null
to resetpublic boolean hasReason()
public int getSkippedCount()
getSkippedCount
in interface IBatchInterrupted
public BatchInterrupted setSkippedCount(java.lang.Integer skippedCount)
skippedCount
- number of entries parsed but not processed or
null
to resetpublic boolean hasSkippedCount()
public int getSuccessCount()
getSuccessCount
in interface IBatchInterrupted
public BatchInterrupted setSuccessCount(java.lang.Integer successCount)
successCount
- number of entries processed successfully or
null
to resetpublic boolean hasSuccessCount()
public int getTotalCount()
getTotalCount
in interface IBatchInterrupted
public BatchInterrupted setTotalCount(java.lang.Integer totalCount)
totalCount
- number of entries that were parsed or null
to resetpublic boolean hasTotalCount()