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 theDirectoryMessageStoreandDirectoryMessageListStorestore classes that keeps all files in a single directory, and keeps a.tmpdirectory 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.PathgetFileFor(java.lang.String key)java.util.Collection<java.lang.String>initialKeySet()java.nio.file.PathtmpFileFor(java.lang.String key)
-
-
-
Method Detail
-
getFileFor
public java.nio.file.Path getFileFor(@Nonnull java.lang.String key)- Specified by:
getFileForin interfaceFileManager<java.lang.String>
-
tmpFileFor
public java.nio.file.Path tmpFileFor(@Nonnull java.lang.String key)- Specified by:
tmpFileForin interfaceFileManager<java.lang.String>
-
initialKeySet
public java.util.Collection<java.lang.String> initialKeySet()
- Specified by:
initialKeySetin interfaceFileManager<java.lang.String>
-
-