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 classReindexJob.ReindexJobBuilder
-
Constructor Summary
Constructors Modifier Constructor Description ReindexJob()protectedReindexJob(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 voidaddError(String errorMsg, String className, Instant errorTime)Adds an error to the error list for this Reindex job.static ReindexJob.ReindexJobBuilderbuilder()protected booleancanEqual(Object other)booleanequals(Object o)StringgetAuthor()The user that initiated this reindex process.InstantgetEndTime()The completion time of the processStringgetErrorMessage()List<ReindexErrorDetails>getErrors()A list of errors that may have occurred during the reindex process.LonggetExpectedCount()The expected number of items to be processed (May be an estimate, such as with Products)InstantgetFinishedLoadingQueueTime()The time taken to load the queue for this job.InstantgetFinishedProcessingQueueTime()The instant in time this queue was finished processing.StringgetId()StringgetIndexableType()The IndexableType of this job (e.g.InstantgetLastUpdated()The last update time of the processStringgetName()The display name which will identify this job to admin users.IntegergetNodeCount()The number of nodes involved in the reindex process.LonggetProcessedCount()The number of items processed during the full reindex.StringgetQueueLoadTime()StringgetQueueProcessTime()StringgetRatePerSecond()InstantgetStartTime()The start time of the processReindexStatusgetStatus()The current status of the reindex process.IntegergetThreadCount()The total number of threads used across all nodes.inthashCode()voidsetAuthor(String author)The user that initiated this reindex process.voidsetEndTime(Instant endTime)The completion time of the processvoidsetErrors(List<ReindexErrorDetails> errors)A list of errors that may have occurred during the reindex process.voidsetExpectedCount(Long expectedCount)The expected number of items to be processed (May be an estimate, such as with Products)voidsetFinishedLoadingQueueTime(Instant finishedLoadingQueueTime)The time taken to load the queue for this job.voidsetFinishedProcessingQueueTime(Instant finishedProcessingQueueTime)The instant in time this queue was finished processing.voidsetId(String id)voidsetIndexableType(String indexableType)The IndexableType of this job (e.g.voidsetLastUpdated(Instant lastUpdated)The last update time of the processvoidsetName(String name)The display name which will identify this job to admin users.voidsetNodeCount(Integer nodeCount)The number of nodes involved in the reindex process.voidsetProcessedCount(Long processedCount)The number of items processed during the full reindex.voidsetStartTime(Instant startTime)The start time of the processvoidsetStatus(ReindexStatus status)The current status of the reindex process.voidsetThreadCount(Integer threadCount)The total number of threads used across all nodes.StringtoString()
-
-
-
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)
-
-