Class DefaultFileManager<K>
- java.lang.Object
-
- net.morimekta.providence.storage.dir.DefaultFileManager<K>
-
- Type Parameters:
K- The key type.
- All Implemented Interfaces:
FileManager<K>
public class DefaultFileManager<K> extends java.lang.Object implements FileManager<K>
File manager for theDirectoryMessageStoreandDirectoryMessageListStorestore classes that keeps all files in a plain directory tree, and keeps a.tmpdirectory for temporary files.
-
-
Constructor Summary
Constructors Constructor Description DefaultFileManager(java.nio.file.Path directory, java.util.function.Function<K,java.nio.file.Path> keyBuilder, java.util.function.Function<java.nio.file.Path,K> keyParser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.PathgetFileFor(K key)java.util.Collection<K>initialKeySet()java.nio.file.PathtmpFileFor(K key)
-
-
-
Method Detail
-
getFileFor
public java.nio.file.Path getFileFor(@Nonnull K key)- Specified by:
getFileForin interfaceFileManager<K>
-
tmpFileFor
public java.nio.file.Path tmpFileFor(@Nonnull K key)- Specified by:
tmpFileForin interfaceFileManager<K>
-
initialKeySet
public java.util.Collection<K> initialKeySet()
- Specified by:
initialKeySetin interfaceFileManager<K>
-
-