Class SimpleSimilarityCacheMatrix

All Implemented Interfaces:

public class SimpleSimilarityCacheMatrix extends AbstractSimilarityCacheMatrix

SimpleSimilarityCacheMatrix class.

See Also:
  • Constructor Details

    • SimpleSimilarityCacheMatrix

      public SimpleSimilarityCacheMatrix()
  • Method Details

    • 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
      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
      caseID - the ID of the case to remove
    • readCleanSimilarityCacheMatrix

      public void readCleanSimilarityCacheMatrix(String path)
      This method reads a similarity cache matrix from disk.
      Specified by:
      readCleanSimilarityCacheMatrix in class AbstractSimilarityCacheMatrix
      path - the path to read from
    • 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
      path - the path to write to