Rename HISTORY to HISTORICAL_RESOURCE_FILE_VERSION_TAGS to make its usage more clear

This commit is contained in:
chimp1984 2020-10-20 22:08:18 -05:00
parent fd00048b47
commit 927004b4be
No known key found for this signature in database
GPG Key ID: 9801B4EC591F90E3
2 changed files with 5 additions and 3 deletions

View File

@ -33,9 +33,11 @@ public class Version {
public static final String VERSION = "1.4.1";
/**
* Holds a list of the versions of tagged resource files for optimizing the getData requests.
* Holds a list of the tagged resource files for optimizing the getData requests.
* This must not contain each version but only those where we add new version-tagged resource files for
* historical data stores.
*/
public static final List<String> HISTORY = Arrays.asList("1.4.0");
public static final List<String> HISTORICAL_RESOURCE_FILE_VERSION_TAGS = Arrays.asList("1.4.0");
public static int getMajorVersion(String version) {
return getSubVersion(version, 0);

View File

@ -154,7 +154,7 @@ public abstract class HistoricalDataStoreService<T extends PersistableNetworkPay
ImmutableMap.Builder<P2PDataStorage.ByteArray, PersistableNetworkPayload> allHistoricalPayloadsBuilder = ImmutableMap.builder();
ImmutableMap.Builder<String, PersistableNetworkPayloadStore<? extends PersistableNetworkPayload>> storesByVersionBuilder = ImmutableMap.builder();
Version.HISTORY.forEach(version -> readHistoricalStoreFromResources(version, postFix, allHistoricalPayloadsBuilder, storesByVersionBuilder));
Version.HISTORICAL_RESOURCE_FILE_VERSION_TAGS.forEach(version -> readHistoricalStoreFromResources(version, postFix, allHistoricalPayloadsBuilder, storesByVersionBuilder));
allHistoricalPayloads = allHistoricalPayloadsBuilder.build();
storesByVersion = storesByVersionBuilder.build();