Add documentation. Add options to enable/disable the hash providers. Add the option for setup barrier for rotation per requests strategy.

This commit is contained in:
Anatoly Sablin
2019-12-02 23:23:17 +03:00
parent 51d9225dda
commit 7509174611
8 changed files with 120 additions and 5 deletions

View File

@@ -15,6 +15,7 @@ public class HashingConfig {
private RotationPolicyEnum rotationPolicy;
private HashStorageEnum hashStorageType;
private long delay = 10;
private int requests = 10;
private List<Algorithm> algorithms = new ArrayList<>();
public void build() {
@@ -26,6 +27,9 @@ public class HashingConfig {
if (RotationPolicyEnum.per_seconds == rotationPolicy) {
LOGGER.info(" Rotation delay: {}", delay);
}
if (RotationPolicyEnum.per_requests == rotationPolicy) {
LOGGER.info(" Rotation after requests: {}", requests);
}
LOGGER.info(" Algorithms: {}", algorithms);
} else {
LOGGER.info("Hash configuration disabled, used only `none` pepper.");
@@ -87,6 +91,14 @@ public class HashingConfig {
this.delay = delay;
}
public int getRequests() {
return requests;
}
public void setRequests(int requests) {
this.requests = requests;
}
public List<Algorithm> getAlgorithms() {
return algorithms;
}