Class ReindexJob
- java.lang.Object
-
- com.broadleafcommerce.search.index.core.domain.ReindexJob
-
public class ReindexJob extends Object
Contains details of an in progress or completed full reindex.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReindexJob.ReindexJobBuilder
-
Constructor Summary
Constructors Modifier Constructor Description ReindexJob()
protected
ReindexJob(String id, String indexableType, String name, String author, Instant startTime, Instant endTime, Instant lastUpdated, Instant finishedLoadingQueueTime, Instant finishedProcessingQueueTime, Long expectedCount, Long processedCount, Integer nodeCount, Integer threadCount, ReindexStatus status, List<ReindexErrorDetails> errors)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addError(String errorMsg, String className, Instant errorTime)
Adds an error to the error list for this Reindex job.static ReindexJob.ReindexJobBuilder
builder()
protected boolean
canEqual(Object other)
boolean
equals(Object o)
String
getAuthor()
The user that initiated this reindex process.Instant
getEndTime()
The completion time of the processString
getErrorMessage()
List<ReindexErrorDetails>
getErrors()
A list of errors that may have occurred during the reindex process.Long
getExpectedCount()
The expected number of items to be processed (May be an estimate, such as with Products)Instant
getFinishedLoadingQueueTime()
The time taken to load the queue for this job.Instant
getFinishedProcessingQueueTime()
The instant in time this queue was finished processing.String
getId()
String
getIndexableType()
The IndexableType of this job (e.g.Instant
getLastUpdated()
The last update time of the processString
getName()
The display name which will identify this job to admin users.Integer
getNodeCount()
The number of nodes involved in the reindex process.Long
getProcessedCount()
The number of items processed during the full reindex.String
getQueueLoadTime()
String
getQueueProcessTime()
String
getRatePerSecond()
Instant
getStartTime()
The start time of the processReindexStatus
getStatus()
The current status of the reindex process.Integer
getThreadCount()
The total number of threads used across all nodes.int
hashCode()
void
setAuthor(String author)
The user that initiated this reindex process.void
setEndTime(Instant endTime)
The completion time of the processvoid
setErrors(List<ReindexErrorDetails> errors)
A list of errors that may have occurred during the reindex process.void
setExpectedCount(Long expectedCount)
The expected number of items to be processed (May be an estimate, such as with Products)void
setFinishedLoadingQueueTime(Instant finishedLoadingQueueTime)
The time taken to load the queue for this job.void
setFinishedProcessingQueueTime(Instant finishedProcessingQueueTime)
The instant in time this queue was finished processing.void
setId(String id)
void
setIndexableType(String indexableType)
The IndexableType of this job (e.g.void
setLastUpdated(Instant lastUpdated)
The last update time of the processvoid
setName(String name)
The display name which will identify this job to admin users.void
setNodeCount(Integer nodeCount)
The number of nodes involved in the reindex process.void
setProcessedCount(Long processedCount)
The number of items processed during the full reindex.void
setStartTime(Instant startTime)
The start time of the processvoid
setStatus(ReindexStatus status)
The current status of the reindex process.void
setThreadCount(Integer threadCount)
The total number of threads used across all nodes.String
toString()
-
-
-
Constructor Detail
-
ReindexJob
public ReindexJob()
-
ReindexJob
protected ReindexJob(String id, String indexableType, String name, String author, Instant startTime, Instant endTime, Instant lastUpdated, Instant finishedLoadingQueueTime, Instant finishedProcessingQueueTime, Long expectedCount, Long processedCount, Integer nodeCount, Integer threadCount, ReindexStatus status, List<ReindexErrorDetails> errors)
-
-
Method Detail
-
getErrorMessage
public String getErrorMessage()
-
getRatePerSecond
public String getRatePerSecond()
- Returns:
- The number of items processed per second
-
getQueueProcessTime
public String getQueueProcessTime()
- Returns:
- The amount of time it took to process all of the items in the queue
-
getQueueLoadTime
public String getQueueLoadTime()
- Returns:
- The amount of time it took to load the reindex queue
-
addError
public void addError(String errorMsg, @Nullable String className, @Nullable Instant errorTime)
Adds an error to the error list for this Reindex job.- Parameters:
errorMsg
- The error messageclassName
- The exception class nameerrorTime
- The approximate time the error occurred.
-
builder
public static ReindexJob.ReindexJobBuilder builder()
-
getId
public String getId()
-
getIndexableType
public String getIndexableType()
The IndexableType of this job (e.g. Customer, Product, etc)
-
getName
public String getName()
The display name which will identify this job to admin users.
-
getAuthor
public String getAuthor()
The user that initiated this reindex process.
-
getStartTime
public Instant getStartTime()
The start time of the process
-
getEndTime
public Instant getEndTime()
The completion time of the process
-
getLastUpdated
public Instant getLastUpdated()
The last update time of the process
-
getFinishedLoadingQueueTime
public Instant getFinishedLoadingQueueTime()
The time taken to load the queue for this job. This is not set until the queue is completely loaded.
-
getFinishedProcessingQueueTime
public Instant getFinishedProcessingQueueTime()
The instant in time this queue was finished processing. This is not set until all items in the queue have been processed.
-
getExpectedCount
public Long getExpectedCount()
The expected number of items to be processed (May be an estimate, such as with Products)
-
getProcessedCount
public Long getProcessedCount()
The number of items processed during the full reindex. In the case of a completed process, this is the total number of items processed during the reindex. For in progress reindexing, this is regularly updated.
-
getNodeCount
public Integer getNodeCount()
The number of nodes involved in the reindex process. If this is not a distributed reindex, this will always be 1.
-
getThreadCount
public Integer getThreadCount()
The total number of threads used across all nodes.
-
getStatus
public ReindexStatus getStatus()
The current status of the reindex process.- See Also:
ReindexStatus
-
getErrors
public List<ReindexErrorDetails> getErrors()
A list of errors that may have occurred during the reindex process. This will be null if no errors have occurred.
-
setId
public void setId(String id)
-
setIndexableType
public void setIndexableType(String indexableType)
The IndexableType of this job (e.g. Customer, Product, etc)
-
setName
public void setName(String name)
The display name which will identify this job to admin users.
-
setAuthor
public void setAuthor(String author)
The user that initiated this reindex process.
-
setStartTime
public void setStartTime(Instant startTime)
The start time of the process
-
setEndTime
public void setEndTime(Instant endTime)
The completion time of the process
-
setLastUpdated
public void setLastUpdated(Instant lastUpdated)
The last update time of the process
-
setFinishedLoadingQueueTime
public void setFinishedLoadingQueueTime(Instant finishedLoadingQueueTime)
The time taken to load the queue for this job. This is not set until the queue is completely loaded.
-
setFinishedProcessingQueueTime
public void setFinishedProcessingQueueTime(Instant finishedProcessingQueueTime)
The instant in time this queue was finished processing. This is not set until all items in the queue have been processed.
-
setExpectedCount
public void setExpectedCount(Long expectedCount)
The expected number of items to be processed (May be an estimate, such as with Products)
-
setProcessedCount
public void setProcessedCount(Long processedCount)
The number of items processed during the full reindex. In the case of a completed process, this is the total number of items processed during the reindex. For in progress reindexing, this is regularly updated.
-
setNodeCount
public void setNodeCount(Integer nodeCount)
The number of nodes involved in the reindex process. If this is not a distributed reindex, this will always be 1.
-
setThreadCount
public void setThreadCount(Integer threadCount)
The total number of threads used across all nodes.
-
setStatus
public void setStatus(ReindexStatus status)
The current status of the reindex process.- See Also:
ReindexStatus
-
setErrors
public void setErrors(List<ReindexErrorDetails> errors)
A list of errors that may have occurred during the reindex process. This will be null if no errors have occurred.
-
canEqual
protected boolean canEqual(Object other)
-
-