Record Class IndexStatus

java.lang.Object
java.lang.Record
com.tnsai.server.rag.IndexStatus
Record Components:
fileCount - number of files that were indexed
chunkCount - total number of document chunks in the knowledge base
lastIndexedAt - 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
    Modifier and Type
    Field
    Description
    static final IndexStatus
    Empty status — nothing indexed yet.
  • Constructor Summary

    Constructors
    Constructor
    Description
    IndexStatus(int fileCount, int chunkCount, long lastIndexedAt, String path)
    Creates an instance of a IndexStatus record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the chunkCount record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the fileCount record component.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the lastIndexedAt record component.
    Returns the value of the path record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • EMPTY

      public static final IndexStatus EMPTY
      Empty status — nothing indexed yet.
  • Constructor Details

    • IndexStatus

      public IndexStatus(int fileCount, int chunkCount, long lastIndexedAt, String path)
      Creates an instance of a IndexStatus record class.
      Parameters:
      fileCount - the value for the fileCount record component
      chunkCount - the value for the chunkCount record component
      lastIndexedAt - the value for the lastIndexedAt record component
      path - the value for the path record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • fileCount

      public int fileCount()
      Returns the value of the fileCount record component.
      Returns:
      the value of the fileCount record component
    • chunkCount

      public int chunkCount()
      Returns the value of the chunkCount record component.
      Returns:
      the value of the chunkCount record component
    • lastIndexedAt

      public long lastIndexedAt()
      Returns the value of the lastIndexedAt record component.
      Returns:
      the value of the lastIndexedAt record component
    • path

      public String path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component