Package com.tnsai.server.rag
Record Class IndexStatus
java.lang.Object
java.lang.Record
com.tnsai.server.rag.IndexStatus
- Record Components:
fileCount- number of files that were indexedchunkCount- total number of document chunks in the knowledge baselastIndexedAt- epoch millis of the last completed index run (0 if never)path- the directory path that was indexed
public record IndexStatus(int fileCount, int chunkCount, long lastIndexedAt, String path)
extends Record
Snapshot of the current index state for a session's RAG pipeline.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIndexStatus(int fileCount, int chunkCount, long lastIndexedAt, String path) Creates an instance of aIndexStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thechunkCountrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefileCountrecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of thelastIndexedAtrecord component.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
Empty status — nothing indexed yet.
-
-
Constructor Details
-
IndexStatus
Creates an instance of aIndexStatusrecord class.- Parameters:
fileCount- the value for thefileCountrecord componentchunkCount- the value for thechunkCountrecord componentlastIndexedAt- the value for thelastIndexedAtrecord componentpath- the value for thepathrecord component
-
-
Method Details
-
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
public final int 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
fileCount
public int fileCount()Returns the value of thefileCountrecord component.- Returns:
- the value of the
fileCountrecord component
-
chunkCount
public int chunkCount()Returns the value of thechunkCountrecord component.- Returns:
- the value of the
chunkCountrecord component
-
lastIndexedAt
public long lastIndexedAt()Returns the value of thelastIndexedAtrecord component.- Returns:
- the value of the
lastIndexedAtrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-