Class SimpleSimilarityCacheMatrix

    • Constructor Detail

      • SimpleSimilarityCacheMatrix

        public SimpleSimilarityCacheMatrix()
    • Method Detail

      • addDirtyCase

        public void addDirtyCase​(String queryID,
                                 String caseID,
                                 Similarity similarity)
        Adds a case to the dirty matrix. This means that this similarity is not serialized to disk, yet.
        Specified by:
        addDirtyCase in class AbstractSimilarityCacheMatrix
        Parameters:
        queryID - the ID of the query
        caseID - the ID of the case
        similarity - the similarity object
      • removeCase

        public void removeCase​(String caseID)
        Removes the case with the given ID from the similarity cache matrix.
        Specified by:
        removeCase in class AbstractSimilarityCacheMatrix
        Parameters:
        caseID - the ID of the case to remove
      • writeDirtySimilarityCacheMatrix

        public void writeDirtySimilarityCacheMatrix​(String path)
        This method writes out the dirty similarity cache to disk. In this process, the matrix is temporarily locked for further access and after the serialization, the similarities are copied to the clean matrix.
        Specified by:
        writeDirtySimilarityCacheMatrix in class AbstractSimilarityCacheMatrix
        Parameters:
        path - the path to write to