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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user