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 theDirectoryMessageStore
andDirectoryMessageListStore
store classes that keeps all files in a plain directory tree, and keeps a.tmp
directory 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.Path
getFileFor(K key)
java.util.Collection<K>
initialKeySet()
java.nio.file.Path
tmpFileFor(K key)
-
-
-
Method Detail
-
getFileFor
public java.nio.file.Path getFileFor(@Nonnull K key)
- Specified by:
getFileFor
in interfaceFileManager<K>
-
tmpFileFor
public java.nio.file.Path tmpFileFor(@Nonnull K key)
- Specified by:
tmpFileFor
in interfaceFileManager<K>
-
initialKeySet
public java.util.Collection<K> initialKeySet()
- Specified by:
initialKeySet
in interfaceFileManager<K>
-
-