Package org.ametys.cms.indexing.solr
Record Class IndexationResult
java.lang.Object
java.lang.Record
org.ametys.cms.indexing.solr.IndexationResult
- Record Components:
successCount
- number of successful taskserrorCount
- number of fail tasks
Record to return indexation results: success and error count.
-
Constructor Summary
ConstructorsConstructorDescriptionIndexationResult
(int successCount, int errorCount) Creates an instance of aIndexationResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.int
Returns the value of theerrorCount
record component.static IndexationResult
fromTasks
(Collection<Future<Void>> tasks, Logger logger) Check each future of launched tasks and count success and errors.boolean
Test if the indexation had errors.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of thesuccessCount
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
IndexationResult
Creates an instance of aIndexationResult
record class.- Parameters:
successCount
- the value for thesuccessCount
record componenterrorCount
- the value for theerrorCount
record component
-
-
Method Details
-
hasErrors
Test if the indexation had errors.- Returns:
true
if the indexation had errors,false
otherwise.
-
fromTasks
Check each future of launched tasks and count success and errors.- Parameters:
tasks
- The tasks launched in the executor servicelogger
- The logger- Returns:
- The indexation result
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
successCount
Returns the value of thesuccessCount
record component.- Returns:
- the value of the
successCount
record component
-
errorCount
Returns the value of theerrorCount
record component.- Returns:
- the value of the
errorCount
record component
-