Package one.microstream.storage.types
Interface StorageFileProvider
- All Superinterfaces:
PersistenceTypeDictionaryIoHandler.Provider
- All Known Subinterfaces:
StorageIoHandler
- All Known Implementing Classes:
StorageFileProvider.Default
,StorageIoHandler.Default
public interface StorageFileProvider extends PersistenceTypeDictionaryIoHandler.Provider
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
StorageFileProvider.Builder<B extends StorageFileProvider.Builder<?>>
static class
StorageFileProvider.Default
static interface
StorageFileProvider.Defaults
static class
StorageFileProvider.Static
-
Method Summary
Modifier and Type Method Description static StorageFileProvider.Builder<?>
Builder()
Pseudo-constructor method to create a newStorageFileProvider.Builder
instance.<P extends Consumer<StorageNumberedFile>>
PcollectDataFiles(P collector, int channelIndex)
String
getStorageLocationIdentifier()
Returns a String that uniquely identifies the storage location.static StorageFileProvider
New()
Pseudo-constructor method to create a newStorageFileProvider
instance with default values provided byStorageFileProvider.Defaults
.static StorageFileProvider.Default
New(String baseDirectory, String deletionDirectory, String truncationDirectory, String channelDirectoryPrefix, String storageFilePrefix, String storageFileSuffix, String transactionsFilePrefix, String transactionsFileSuffix, String typeDictionaryFileName, String lockFileName, PersistenceTypeDictionaryFileHandler.Creator fileHandlerCreator)
static StorageFileProvider
New(Path storageDirectory)
Pseudo-constructor method to create a newStorageFileProvider
instance with the passed file as the storage directory and defaults provided byStorageFileProvider.Defaults
.StorageNumberedFile
provideDataFile(int channelIndex, long fileNumber)
StorageNumberedFile
provideDeletionTargetFile(StorageNumberedFile fileToBeDeleted)
StorageLockedFile
provideLockFile()
StorageNumberedFile
provideTransactionsFile(int channelIndex)
StorageNumberedFile
provideTruncationBackupTargetFile(StorageNumberedFile fileToBeTruncated, long newLength)
PersistenceTypeDictionaryIoHandler
provideTypeDictionaryIoHandler(PersistenceTypeDictionaryStorer writeListener)
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeDictionaryIoHandler.Provider
provideTypeDictionaryIoHandler
-
Method Details
-
getStorageLocationIdentifier
String getStorageLocationIdentifier()Returns a String that uniquely identifies the storage location.- Returns:
- a String that uniquely identifies the storage location.
-
provideTypeDictionaryIoHandler
PersistenceTypeDictionaryIoHandler provideTypeDictionaryIoHandler(PersistenceTypeDictionaryStorer writeListener)- Specified by:
provideTypeDictionaryIoHandler
in interfacePersistenceTypeDictionaryIoHandler.Provider
-
provideDataFile
-
provideTransactionsFile
-
provideLockFile
StorageLockedFile provideLockFile() -
provideDeletionTargetFile
-
provideTruncationBackupTargetFile
StorageNumberedFile provideTruncationBackupTargetFile(StorageNumberedFile fileToBeTruncated, long newLength) -
collectDataFiles
-
Builder
Pseudo-constructor method to create a newStorageFileProvider.Builder
instance.For explanations and customizing values, see
StorageFileProvider.Builder
.- Returns:
- a new
StorageFileProvider.Builder
instance.
-
New
Pseudo-constructor method to create a newStorageFileProvider
instance with default values provided byStorageFileProvider.Defaults
.For explanations and customizing values, see
StorageFileProvider.Builder
.- Returns:
- a new
StorageFileProvider
instance. - See Also:
New(Path)
,StorageFileProvider.Builder
,StorageFileProvider.Defaults
-
New
Pseudo-constructor method to create a newStorageFileProvider
instance with the passed file as the storage directory and defaults provided byStorageFileProvider.Defaults
.For explanations and customizing values, see
StorageFileProvider.Builder
.- Parameters:
storageDirectory
- the directory where the storage will be located.- Returns:
- a new
StorageFileProvider
instance. - See Also:
New()
,StorageFileProvider.Builder
,StorageFileProvider.Defaults
-
New
static StorageFileProvider.Default New(String baseDirectory, String deletionDirectory, String truncationDirectory, String channelDirectoryPrefix, String storageFilePrefix, String storageFileSuffix, String transactionsFilePrefix, String transactionsFileSuffix, String typeDictionaryFileName, String lockFileName, PersistenceTypeDictionaryFileHandler.Creator fileHandlerCreator)- Parameters:
baseDirectory
- may not be null.channelDirectoryPrefix
- may not be null.storageFilePrefix
- may not be null.storageFileSuffix
- may not be null.transactionsFilePrefix
- may not be null.transactionsFileSuffix
- may not be null.typeDictionaryFileName
- may not be null.lockFileName
- may not be null.fileHandlerCreator
- may not be null.deletionDirectory
- may be null.truncationDirectory
- may be null.
-