Package ghidra.features.bsim.query.client

# Class TableScoreCaching

java.lang.Object
ghidra.features.bsim.query.client.TableScoreCaching

All Implemented Interfaces:
  `ScoreCaching`

public class TableScoreCaching extends Object implements ScoreCaching

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TableScoreCaching(FunctionDatabase d)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `commitSelfScore(String md5, float score)`
  Commit a new self-significance score for an executable
  `float`
  `getSelfScore(String md5)`
  Retrieve the self-significance score for a given executable
  `double`
  `getSigThreshold()`
  `double`
  `getSimThreshold()`
  `void`
  `prefetchScores(Set<ExecutableRecord> exeSet, List<ExecutableRecord> missing)`
  Pre-load self-scores for a set of executables.
  `void`
  `resetStorage(double simThresh, double sigThresh)`
  Clear out any existing scores, and reset to an empty database

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TableScoreCaching

    public TableScoreCaching(FunctionDatabase d)

- ## Method Details

  - ### prefetchScores

    public void prefetchScores(Set<ExecutableRecord> exeSet, List<ExecutableRecord> missing) throws LSHException
    Description copied from interface: `ScoreCaching`
    Pre-load self-scores for a set of executables.
    Specified by:
      `prefetchScores` in interface `ScoreCaching`
    Parameters:
      `exeSet` - is the set of executables to check
      `missing` - (optional - may be null) will contain the list of exes missing a score
    Throws:
      `LSHException` - if there are problems loading scores

  - ### getSelfScore

    public float getSelfScore(String md5) throws LSHException
    Description copied from interface: `ScoreCaching`
    Retrieve the self-significance score for a given executable
    Specified by:
      `getSelfScore` in interface `ScoreCaching`
    Parameters:
      `md5` - is the 32-character md5 string specifying the executable
    Returns:
      the corresponding score
    Throws:
      `LSHException` - if the score is not obtainable

  - ### commitSelfScore

    public void commitSelfScore(String md5, float score) throws LSHException
    Description copied from interface: `ScoreCaching`
    Commit a new self-significance score for an executable
    Specified by:
      `commitSelfScore` in interface `ScoreCaching`
    Parameters:
      `md5` - is the 32-character md5 string specifying the executable
      `score` - is the score to commit
    Throws:
      `LSHException` - if there's a problem saving the value

  - ### getSimThreshold

    public double getSimThreshold() throws LSHException
    Specified by:
      `getSimThreshold` in interface `ScoreCaching`
    Returns:
      similarity threshold configured with this cache OR return -1 if the score is unconfigured
    Throws:
      `LSHException` - for problems retrieving configuration

  - ### getSigThreshold

    public double getSigThreshold() throws LSHException
    Specified by:
      `getSigThreshold` in interface `ScoreCaching`
    Returns:
      significance threshold configured with this cache OR return -1 if the score is unconfigured
    Throws:
      `LSHException` - for problems retrieving configuration

  - ### resetStorage

    public void resetStorage(double simThresh, double sigThresh) throws LSHException
    Description copied from interface: `ScoreCaching`
    Clear out any existing scores, and reset to an empty database
    Specified by:
      `resetStorage` in interface `ScoreCaching`
    Parameters:
      `simThresh` - is new similarity threshold to associate with scores
      `sigThresh` - is new significance threshold to associate with scores
    Throws:
      `LSHException` - if there is a problem modifying storage