move filename for keys.csv to UniqueStringIntegerPairs
This commit is contained in:
@@ -21,8 +21,8 @@ public class StringCompressor {
|
||||
this.usip = usip;
|
||||
}
|
||||
|
||||
public static StringCompressor create(final Path path) {
|
||||
final UniqueStringIntegerPairs mapsi = new UniqueStringIntegerPairs(path);
|
||||
public static StringCompressor create(final Path storageBasePath) {
|
||||
final UniqueStringIntegerPairs mapsi = new UniqueStringIntegerPairs(storageBasePath);
|
||||
final StringCompressor result = new StringCompressor(mapsi);
|
||||
|
||||
result.put(ALL_DOCS_KEY);
|
||||
|
||||
@@ -103,13 +103,17 @@ public class UniqueStringIntegerPairs {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public UniqueStringIntegerPairs(final Path file) {
|
||||
this.file = file;
|
||||
public UniqueStringIntegerPairs(final Path storageBasePath) {
|
||||
this.file = keyCompressionFile(storageBasePath);
|
||||
if (file != null) {
|
||||
init(file);
|
||||
}
|
||||
}
|
||||
|
||||
private Path keyCompressionFile(final Path dataDirectory) {
|
||||
return dataDirectory.resolve("keys.csv");
|
||||
}
|
||||
|
||||
private void init(final Path file) throws RuntimeIOException {
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user