Class SpincastAttemptsLimiterPluginConfigDefault
java.lang.Object
org.spincast.plugins.attemptslimiter.config.SpincastAttemptsLimiterPluginConfigDefault
- All Implemented Interfaces:
SpincastAttemptsLimiterPluginConfig
public class SpincastAttemptsLimiterPluginConfigDefault
extends Object
implements SpincastAttemptsLimiterPluginConfig
Default configurations for Spincast Attempts Limiter plugin.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionShould theAttemptsManager.attempt(String, org.spincast.plugins.attemptslimiter.AttemptCriteria...)
method automatically increment the number of attempts by default, when not specified otherwise?int
The number of minutes between two launches of the scheduled task that will clean the database from old attempts, ifSpincastAttemptsLimiterPluginConfig.isAutoBindDeleteOldAttemptsScheduledTask()
is enabled.protected SpincastConfig
boolean
Should the scheduled task to delete old attempts in the database be automatically added?boolean
Is attempts validation enabled?
-
Constructor Details
-
SpincastAttemptsLimiterPluginConfigDefault
-
-
Method Details
-
getSpincastConfig
-
isAutoBindDeleteOldAttemptsScheduledTask
public boolean isAutoBindDeleteOldAttemptsScheduledTask()Description copied from interface:SpincastAttemptsLimiterPluginConfig
Should the scheduled task to delete old attempts in the database be automatically added?- Specified by:
isAutoBindDeleteOldAttemptsScheduledTask
in interfaceSpincastAttemptsLimiterPluginConfig
-
getDeleteOldAttemptsScheduledTaskIntervalMinutes
public int getDeleteOldAttemptsScheduledTaskIntervalMinutes()Description copied from interface:SpincastAttemptsLimiterPluginConfig
The number of minutes between two launches of the scheduled task that will clean the database from old attempts, ifSpincastAttemptsLimiterPluginConfig.isAutoBindDeleteOldAttemptsScheduledTask()
is enabled.- Specified by:
getDeleteOldAttemptsScheduledTaskIntervalMinutes
in interfaceSpincastAttemptsLimiterPluginConfig
-
getDefaultAttemptAutoIncrementType
Description copied from interface:SpincastAttemptsLimiterPluginConfig
Should theAttemptsManager.attempt(String, org.spincast.plugins.attemptslimiter.AttemptCriteria...)
method automatically increment the number of attempts by default, when not specified otherwise?If you don't let the method increment the number of attempts, you are responsible to call
Attempt.incrementAttemptsCount()
by yourself, when required.Defaults to
AttemptsAutoIncrementType.ALWAYS
.- Specified by:
getDefaultAttemptAutoIncrementType
in interfaceSpincastAttemptsLimiterPluginConfig
-
isValidationEnabled
public boolean isValidationEnabled()Description copied from interface:SpincastAttemptsLimiterPluginConfig
Is attempts validation enabled?You can set this to
true
when developing locally.Defaults to the negation of
SpincastConfig.isDevelopmentMode()
.- Specified by:
isValidationEnabled
in interfaceSpincastAttemptsLimiterPluginConfig
-