Interface FactStorage<FH extends FactHandle,V>

Type Parameters:
FH - the type of the fact handle
V - the type of the value associated with the fact handle
All Known Implementing Classes:
FactStorageWrapper

public interface FactStorage<FH extends FactHandle,V>
A fact storage interface
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears the memory
    get(FH factHandle)
    Retrieves a fact value by fact handle.
    void
    insert(FH factHandle, V value)
    Inserts a fact into the delta storage.
    remove(FH factHandle)
    Deletes a fact from the memory for both MemoryScope.DELTA and MemoryScope.MAIN scopes.
    Returns stream of currently stored values.
  • Method Details

    • insert

      void insert(FH factHandle, V value)
      Inserts a fact into the delta storage.
      Parameters:
      factHandle - the handle for the fact to be inserted
      value - the value associated with the fact handle
    • remove

      V remove(FH factHandle)
      Deletes a fact from the memory for both MemoryScope.DELTA and MemoryScope.MAIN scopes.
      Parameters:
      factHandle - the previously assigned fact handle
      Returns:
      the previously existing value, or null if no value was associated with the fact handle
    • get

      V get(FH factHandle)
      Retrieves a fact value by fact handle.
      Parameters:
      factHandle - the handle for the fact to be retrieved
      Returns:
      the value associated with the fact handle, or null if not found
    • stream

      Stream<Map.Entry<FH,V>> stream()
      Returns stream of currently stored values.
      Returns:
      stream of currently stored mappings.
    • clear

      void clear()
      Clears the memory