Interface MemoryFactory


public interface MemoryFactory
The MemoryFactory interface defines methods for creating different types of memories used in the engine.
See Also:
  • Method Details

    • newBetaStorage

      KeyedFactStorage newBetaStorage(int fieldCount)
      Creates a new instance of KeyedFactStorage (RETE alpha and beta memories) with the specified field count.
      Parameters:
      fieldCount - the number of fields in the KeyedFactStorage
      Returns:
      a new instance of KeyedFactStorage
    • newMemoryKeyCollection

      MemoryKeyCollection newMemoryKeyCollection()
    • getValueResolver

      ValueResolver getValueResolver()
    • newFactStorage

      <Z> FactStorage<Z> newFactStorage(Type<?> type, Class<Z> storageClass, BiPredicate<Z,Z> identityFunction)
      Creates a new instance of FactStorage for the specified type of facts, storage class, and identity function.
      Type Parameters:
      Z - the type parameter representing the facts
      Parameters:
      type - the type of facts that the storage will handle
      storageClass - the class of the storage implementation
      identityFunction - the identity function to determine if two facts are equal
      Returns:
      a new instance of FactStorage for the specified type