#1147 Rename limbo segment configurations / remove inaccurate comments

This commit is contained in:
ljacqu
2017-03-28 21:49:28 +02:00
parent adb007108d
commit 2ecdc57277
8 changed files with 29 additions and 34 deletions
@@ -52,7 +52,7 @@ class DistributedFilesPersistenceHandler implements LimboPersistenceHandler {
.setPrettyPrinting()
.create();
segmentNameBuilder = new SegmentNameBuilder(settings.getProperty(LimboSettings.SEGMENT_DISTRIBUTION));
segmentNameBuilder = new SegmentNameBuilder(settings.getProperty(LimboSettings.DISTRIBUTION_SIZE));
convertOldDataToCurrentSegmentScheme();
deleteEmptyFiles();
@@ -18,7 +18,7 @@ class SegmentNameBuilder {
*
* @param partition the segment configuration
*/
SegmentNameBuilder(SegmentConfiguration partition) {
SegmentNameBuilder(SegmentSize partition) {
this.length = partition.getLength();
this.distribution = partition.getDistribution();
this.prefix = "seg" + partition.getTotalSegments() + "-";
@@ -33,7 +33,7 @@ package fr.xephi.authme.data.limbo.persistence;
* Where possible, prefer a length of 1 (no string concatenation required) or a distribution of
* 16 (no remapping of the characters required).
*/
public enum SegmentConfiguration {
public enum SegmentSize {
/** 1. */
ONE(1, 1),
@@ -65,7 +65,7 @@ public enum SegmentConfiguration {
private final int distribution;
private final int length;
SegmentConfiguration(int distribution, int length) {
SegmentSize(int distribution, int length) {
this.distribution = distribution;
this.length = length;
}