public class BulkStatus extends Object implements AsyncStatus<String>
Modifier and Type | Class and Description |
---|---|
static class |
BulkStatus.State
Possible states of a bulk command:
|
Modifier and Type | Field and Description |
---|---|
protected String |
action |
protected String |
commandId |
protected Long |
completedTime |
protected boolean |
delta |
protected long |
errorCount |
protected String |
errorMessage |
protected Long |
processed |
protected Long |
processingDurationMillis |
protected Long |
processingEndTime |
protected Long |
processingStartTime |
protected Map<String,Serializable> |
result |
protected Long |
scrollEndTime |
protected Long |
scrollStartTime |
protected BulkStatus.State |
state |
protected Long |
submitTime |
protected Long |
total |
protected String |
username |
Modifier | Constructor and Description |
---|---|
protected |
BulkStatus() |
|
BulkStatus(String commandId) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkForCompletedState() |
static BulkStatus |
deltaOf(String commandId)
Creates a delta status for a command.
|
boolean |
equals(Object o) |
String |
getAction()
Gets the action name of the command.
|
Instant |
getCompletedTime()
Gets the time when the command has been detected as completed.
|
long |
getErrorCount()
Returns the number of errors encountered
|
String |
getErrorMessage()
Returns the first error message if any or null.
|
String |
getId()
Gets the asynchronous task id.
|
long |
getProcessed()
For a full status returns the number of documents where the action has been applied so far.
|
long |
getProcessingDurationMillis()
Gets the accumulated processing time in milliseconds.
|
Instant |
getProcessingEndTime()
Gets the time when the last action computation has terminated.
|
Instant |
getProcessingStartTime()
Gets the time when the action computation starts.
|
Map<String,Serializable> |
getResult()
Gets action result.
|
Instant |
getScrollEndTime()
Gets the time when the scrolling is completed.
|
Instant |
getScrollStartTime()
Gets the time when the scroll computation starts.
|
BulkStatus.State |
getState()
Gets the state of the command.
|
Instant |
getSubmitTime()
Gets the time when the command was submitted to the Bulk service.
|
long |
getTotal()
Gets the total number of documents in the document set.
|
String |
getUsername()
Gets the username of the user running the command.
|
boolean |
hasError() |
int |
hashCode() |
void |
inError(String message)
An error occurred during the processing
|
boolean |
isCompleted()
Returns true if command is completed.
|
boolean |
isDelta()
This is an update of a status containing only partial information.
|
void |
merge(BulkStatus update)
Updates the status with the provided update.
|
void |
setAction(String action) |
void |
setCompletedTime(Instant completedTime) |
void |
setErrorCount(long errorCount) |
void |
setId(String id) |
void |
setProcessed(long processed)
Sets number of processed documents.
|
void |
setProcessingDurationMillis(long processingDurationMillis) |
void |
setProcessingEndTime(Instant processingEndTime) |
void |
setProcessingStartTime(Instant processingStartTime) |
void |
setResult(Map<String,Serializable> result)
Sets action result.
|
void |
setScrollEndTime(Instant scrollEndTime) |
void |
setScrollStartTime(Instant scrollStartTime) |
void |
setState(BulkStatus.State state) |
void |
setSubmitTime(Instant submitTime) |
void |
setTotal(long count)
Sets the total number of documents in the document set
|
void |
setUsername(String username) |
String |
toString() |
static BulkStatus |
unknownOf(String commandId)
Creates a delta status for a command.
|
protected boolean delta
protected long errorCount
@Nullable protected String errorMessage
@Nullable protected BulkStatus.State state
@Nullable protected Long submitTime
@Nullable protected Long scrollStartTime
@Nullable protected Long scrollEndTime
@Nullable protected Long processingStartTime
@Nullable protected Long processingEndTime
@Nullable protected Long completedTime
@Nullable protected Long processingDurationMillis
@Nullable protected Map<String,Serializable> result
protected BulkStatus()
public BulkStatus(@NotNull String commandId)
public static BulkStatus deltaOf(@NotNull String commandId)
public static BulkStatus unknownOf(@NotNull String commandId)
public void merge(@NotNull BulkStatus update)
protected void checkForCompletedState()
public String getId()
AsyncStatus
getId
in interface AsyncStatus<String>
public BulkStatus.State getState()
public void setState(BulkStatus.State state)
public Instant getSubmitTime()
public void setSubmitTime(@NotNull Instant submitTime)
public Instant getScrollStartTime()
public void setScrollStartTime(@NotNull Instant scrollStartTime)
public Instant getScrollEndTime()
public void setScrollEndTime(@NotNull Instant scrollEndTime)
public Instant getProcessingStartTime()
public void setProcessingStartTime(@NotNull Instant processingStartTime)
public Instant getProcessingEndTime()
public void setProcessingEndTime(@NotNull Instant processingEndTime)
public Instant getCompletedTime()
public void setCompletedTime(@NotNull Instant completedTime)
public boolean isCompleted()
AsyncStatus
isCompleted
in interface AsyncStatus<String>
public long getProcessed()
public void setProcessed(long processed)
merge(BulkStatus)
operation.public long getTotal()
public void setTotal(long count)
public Map<String,Serializable> getResult()
public void setResult(Map<String,Serializable> result)
result
- the action resultpublic boolean isDelta()
public String getUsername()
public void setUsername(String username)
public long getProcessingDurationMillis()
public void setProcessingDurationMillis(long processingDurationMillis)
public boolean hasError()
public String getErrorMessage()
public long getErrorCount()
public void setErrorCount(long errorCount)
Copyright © 2019 Nuxeo. All rights reserved.