MicroStream Reference Manual
MicroStream HomeAPI Docs
2.0
2.0
  • Preface
  • System Requirements
  • License
  • Installation
  • Data-Store
    • Overview
    • Getting Started
    • Root Instances
    • Configuration
      • Properties
      • Storage Files and Directories
      • Using Channels
      • Housekeeping
      • Backup
      • Lock File
    • Storing Data
      • Convenience Methods and Explicit Storing (Transactions)
      • Lazy and Eager Storing
      • Transient Fields
      • Best Practice
    • Loading Data
      • Lazy Loading
        • Touched Timestamp, Null-Safe Variant
        • Clearing Lazy References
    • Deleting Data
    • Queries
    • Application Life-Cycle
    • Legacy Type Mapping
      • User Interaction
    • Backup Strategies
    • Import / Export
    • Housekeeping
    • FAQ
      • Data Model
      • Data Management
      • File Storage
      • Miscellaneous
    • Customizing
      • Custom Type Handler
      • Custom Legacy Type Handler
      • PersistenceEagerStoringFieldEvaluator
Powered by GitBook
On this page
Export as PDF
  1. Data-Store
  2. Configuration

Storage Files and Directories

PreviousPropertiesNextUsing Channels

Last updated 3 years ago

This is the manual for older MicroStream versions (Version < 5.0).

The new documentation (Version >= 5.0) is located at:

Using a Storage File Provider (one.microstream.storage.types.StorageFileProvider) allows to specify the location and naming rules for all storage related files.

available properties are:

  • BaseDirectory The Microstream storages location base directory. Contains channel directories and type dictionary file.

  • DeletionDirectory If configured, the storage will not delete files. Instead of deleting a file it will be moved to this directory.

  • TruncationDirectory If configured, files that will get truncated are copied into this directory.

  • ChannelDirectoryPrefix Channel directory prefix string

  • StorageFilePrefix Storage file prefix string

  • StorageFileSuffix storage file extension

  • TransactionsFilePrefix transactions file prefix

  • TransactionsFileSuffix transaction file extension

  • TypeDictionaryFileName filename of the type dictionary

StorageFileProvider fileProvider = Storage.FileProviderBuilder()
	.setBaseDirectory         (WORKINGDIR.getPath())
	.setDeletionDirectory     (DELETIONDIR.getPath())
	.setTruncationDirectory   (TRUNKATIONDIR.getPath())
	.setChannelDirectoryPrefix("canal_")
	.setStorageFilePrefix     ("canal_")
	.setStorageFileSuffix     (".bin")
	.setTransactionsFilePrefix("events_")
	.setTransactionsFileSuffix(".bin")
	.setTypeDictionaryFileName("typeDictionary.txt")
	.createFileProvider();
https://docs.microstream.one/