Class StringKeyFileManager
- java.lang.Object
-
- net.morimekta.providence.storage.dir.StringKeyFileManager
-
- All Implemented Interfaces:
FileManager<java.lang.String>
public class StringKeyFileManager extends java.lang.Object implements FileManager<java.lang.String>
File manager for theDirectoryMessageStore
andDirectoryMessageListStore
store classes that keeps all files in a single directory, and keeps a.tmp
directory for temporary files. Note that this differs from the DefaultFileManager that it does not allow full paths for the key, e.g. cannot contain file separator in the key string.
-
-
Constructor Summary
Constructors Constructor Description StringKeyFileManager(java.nio.file.Path directory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.Path
getFileFor(java.lang.String key)
java.util.Collection<java.lang.String>
initialKeySet()
java.nio.file.Path
tmpFileFor(java.lang.String key)
-
-
-
Method Detail
-
getFileFor
public java.nio.file.Path getFileFor(@Nonnull java.lang.String key)
- Specified by:
getFileFor
in interfaceFileManager<java.lang.String>
-
tmpFileFor
public java.nio.file.Path tmpFileFor(@Nonnull java.lang.String key)
- Specified by:
tmpFileFor
in interfaceFileManager<java.lang.String>
-
initialKeySet
public java.util.Collection<java.lang.String> initialKeySet()
- Specified by:
initialKeySet
in interfaceFileManager<java.lang.String>
-
-