Class InMemoryContextRepository

  • All Implemented Interfaces:
    com.embabel.agent.spi.ContextRepository

    
    public final class InMemoryContextRepository
     implements ContextRepository
                        

    In-memory implementation of ContextRepository with configurable window size to prevent memory overflow by evicting the oldest entries when the limit is reached.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Context create() Create an empty context.
      Context findById(String id)
      Context save(Context context)
      Unit delete(Context context)
      final Integer size() Get current size of the repository for testing purposes.
      final Unit clear() Clear all entries from the repository for testing purposes.
      • Methods inherited from class java.lang.Object

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