| Constructor and Description |
|---|
AttemptDefault(SpincastAttemptsLimiterPluginRepository spincastAttemptsLimiterPlguinRepository,
boolean maxReached,
String actionName,
AttemptCriteria... criterias) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAttempts()
Deletes all attempts for this action and criterias.
|
String |
getActionName() |
AttemptCriteria[] |
getCriterias() |
protected SpincastAttemptsLimiterPluginRepository |
getSpincastAttemptsLimiterPluginRepository() |
void |
incrementAttemptsCount()
Increments the number of attempts.
|
boolean |
isMaxReached()
Max number of attempts reached.
|
String |
toString() |
public AttemptDefault(SpincastAttemptsLimiterPluginRepository spincastAttemptsLimiterPlguinRepository, boolean maxReached, String actionName, AttemptCriteria... criterias)
protected SpincastAttemptsLimiterPluginRepository getSpincastAttemptsLimiterPluginRepository()
public String getActionName()
public AttemptCriteria[] getCriterias()
public boolean isMaxReached()
AttemptisMaxReached in interface Attemptpublic void incrementAttemptsCount()
Attempt
You have to call this method manually if
you don't let the AttemptsManager.attempt(String, org.spincast.plugins.attemptslimiter.AttemptCriteria...)
method do it.
Note that calling this method multiple times won't result in multiple increments. The count will be incremented only once!
incrementAttemptsCount in interface AttemptSpincastAttemptsLimiterPluginConfig#getDefaultAttemptAutoIncrementType()}
and {@link AttemptsManager#attempt(String, AttemptAutoIncrementType, AttemptCriteria...)}.public void deleteAttempts()
AttemptIn some situations, you may want to clear the attempts when an action is succesfull.
deleteAttempts in interface AttemptCopyright © 2018. All rights reserved.