Interface StateRepository

All Known Implementing Classes:
StateRepositoryImpl

public interface StateRepository
The state of the application consists of two lists of structure identifiers:
  • known: entries that have been processed (might become invalid if e.g. alpha carbon trace)
  • dirty: all identifiers that could cause a corrupted state (if update fails during inverted index writing) - useful to recover
This instance also does double duty and provides assembly information.
  • Method Details

    • selectAssemblyMap

      Map<String,Set<String>> selectAssemblyMap(String structureIdentifier)
      Provides assembly information.
      Parameters:
      structureIdentifier - the structure of interest
      Returns:
      a map with operator expressions as key and a collection of all corresponding assembly ids as value
    • selectKnown

      Returns all registered revisions.
      Returns:
      a collection of ids and their corresponding revision
    • selectDirty

      Collection<String> selectDirty()
      The set of currently 'dirty' ids. Will be populated when update starts and emptied upon successful completion. Problematic if not the empty set after an update.
      Returns:
      a collection of ids
    • insertKnown

      void insertKnown(Collection<StructureInformation> additions)
      Insert into 'known' collection.
      Parameters:
      additions - a collection of ids
    • insertDirty

      void insertDirty(Collection<String> additions)
      Insert into 'dirty' collection.
      Parameters:
      additions - a collection of ids
    • deleteKnown

      void deleteKnown(Collection<String> removals)
      Remove from 'known' collection.
      Parameters:
      removals - a collection of ids
    • deleteDirty

      void deleteDirty(Collection<String> removals)
      Remove from 'dirty' collection.
      Parameters:
      removals - a collection of ids