Class DriftStore

java.lang.Object
org.mockserver.mock.drift.DriftStore

public class DriftStore extends Object
Thread-safe LRU-capped store of DriftRecord entries. Oldest entries are evicted when the store reaches its maximum capacity.
  • Constructor Details

    • DriftStore

      public DriftStore(int maxSize)
  • Method Details

    • getInstance

      public static DriftStore getInstance()
    • add

      public void add(DriftRecord record)
    • getRecent

      public List<DriftRecord> getRecent(int limit)
      Returns up to limit most-recent records, newest first.
    • getByExpectationId

      public List<DriftRecord> getByExpectationId(String expectationId)
      Returns all records for the given expectation ID, in insertion order.
    • clear

      public void clear()
    • size

      public int size()