Class RecordedExpectationFileSystemPersistence

java.lang.Object
org.mockserver.persistence.RecordedExpectationFileSystemPersistence
All Implemented Interfaces:
MockServerLogListener

public class RecordedExpectationFileSystemPersistence extends Object implements MockServerLogListener
  • Constructor Details

    • RecordedExpectationFileSystemPersistence

      public RecordedExpectationFileSystemPersistence(Configuration configuration, MockServerLogger mockServerLogger, MockServerEventLog mockServerEventLog, BlobStore blobStore)
      Creates persistence backed by the given BlobStore. The blob key is the absolute path of configuration.persistedRecordedExpectationsPath() so that the FilesystemBlobStore writes to the exact same file as the previous direct-I/O implementation.
      Parameters:
      configuration - the MockServer configuration
      mockServerLogger - logger for diagnostics
      mockServerEventLog - the event log to observe for recorded expectations
      blobStore - the blob store to delegate writes to
    • RecordedExpectationFileSystemPersistence

      public RecordedExpectationFileSystemPersistence(Configuration configuration, MockServerLogger mockServerLogger, MockServerEventLog mockServerEventLog)
      Backwards-compatible constructor that creates a FilesystemBlobStore internally, preserving the original direct-file-I/O behaviour for callers that do not supply a BlobStore (e.g. existing tests).
  • Method Details