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
Constructors -
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?intThe number of minutes between two launches of the scheduled task that will clean the database from old attempts, ifSpincastAttemptsLimiterPluginConfig.isAutoBindDeleteOldAttemptsScheduledTask()is enabled.protected SpincastConfigbooleanShould the scheduled task to delete old attempts in the database be automatically added?booleanIs attempts validation enabled?
-
Constructor Details
-
SpincastAttemptsLimiterPluginConfigDefault
-
-
Method Details
-
getSpincastConfig
-
isAutoBindDeleteOldAttemptsScheduledTask
public boolean isAutoBindDeleteOldAttemptsScheduledTask()Description copied from interface:SpincastAttemptsLimiterPluginConfigShould the scheduled task to delete old attempts in the database be automatically added?- Specified by:
isAutoBindDeleteOldAttemptsScheduledTaskin interfaceSpincastAttemptsLimiterPluginConfig
-
getDeleteOldAttemptsScheduledTaskIntervalMinutes
public int getDeleteOldAttemptsScheduledTaskIntervalMinutes()Description copied from interface:SpincastAttemptsLimiterPluginConfigThe number of minutes between two launches of the scheduled task that will clean the database from old attempts, ifSpincastAttemptsLimiterPluginConfig.isAutoBindDeleteOldAttemptsScheduledTask()is enabled.- Specified by:
getDeleteOldAttemptsScheduledTaskIntervalMinutesin interfaceSpincastAttemptsLimiterPluginConfig
-
getDefaultAttemptAutoIncrementType
Description copied from interface:SpincastAttemptsLimiterPluginConfigShould 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:
getDefaultAttemptAutoIncrementTypein interfaceSpincastAttemptsLimiterPluginConfig
-
isValidationEnabled
public boolean isValidationEnabled()Description copied from interface:SpincastAttemptsLimiterPluginConfigIs attempts validation enabled?You can set this to
truewhen developing locally.Defaults to the negation of
SpincastConfig.isDevelopmentMode().- Specified by:
isValidationEnabledin interfaceSpincastAttemptsLimiterPluginConfig
-