Class LoginFailuresUpdater
java.lang.Object
org.keycloak.models.sessions.infinispan.changes.remote.updater.BaseUpdater<LoginFailureKey,LoginFailureEntity>
org.keycloak.models.sessions.infinispan.changes.remote.updater.loginfailures.LoginFailuresUpdater
- All Implemented Interfaces:
BiFunction<LoginFailureKey,
,LoginFailureEntity, LoginFailureEntity> Updater<LoginFailureKey,
,LoginFailureEntity> UserLoginFailureModel
public class LoginFailuresUpdater
extends BaseUpdater<LoginFailureKey,LoginFailureEntity>
implements UserLoginFailureModel
Implementation of
Updater
and UserLoginFailureModel
.
It keeps track of the changes made to the entity LoginFailureEntity
and replays on commit.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.keycloak.models.sessions.infinispan.changes.remote.updater.BaseUpdater
BaseUpdater.UpdaterState
-
Field Summary
Fields inherited from interface org.keycloak.models.sessions.infinispan.changes.remote.updater.Updater
NO_VERSION
-
Method Summary
Modifier and TypeMethodDescriptionapply
(LoginFailureKey ignored, LoginFailureEntity cachedEntity) void
Computes the expiration data for Infinispan cache.static LoginFailuresUpdater
create
(LoginFailureKey key, LoginFailureEntity entity) static LoginFailuresUpdater
delete
(LoginFailureKey key) int
getId()
long
int
int
void
void
protected boolean
void
setFailedLoginNotBefore
(int notBefore) void
setLastFailure
(long lastFailure) void
static LoginFailuresUpdater
wrap
(LoginFailureKey key, LoginFailureEntity value, long version) Methods inherited from class org.keycloak.models.sessions.infinispan.changes.remote.updater.BaseUpdater
equals, getKey, getValue, getVersionRead, hashCode, isCreated, isDeleted, isReadOnly, isTransient, markDeleted, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
Methods inherited from interface org.keycloak.models.sessions.infinispan.changes.remote.updater.Updater
hasVersion
-
Method Details
-
create
-
wrap
public static LoginFailuresUpdater wrap(LoginFailureKey key, LoginFailureEntity value, long version) -
delete
-
computeExpiration
Description copied from interface:Updater
Computes the expiration data for Infinispan cache.- Specified by:
computeExpiration
in interfaceUpdater<LoginFailureKey,
LoginFailureEntity> - Returns:
- The
Expiration
data.
-
apply
- Specified by:
apply
in interfaceBiFunction<LoginFailureKey,
LoginFailureEntity, LoginFailureEntity>
-
getFailedLoginNotBefore
public int getFailedLoginNotBefore()- Specified by:
getFailedLoginNotBefore
in interfaceUserLoginFailureModel
-
getLastFailure
public long getLastFailure()- Specified by:
getLastFailure
in interfaceUserLoginFailureModel
-
getLastIPFailure
- Specified by:
getLastIPFailure
in interfaceUserLoginFailureModel
-
getNumFailures
public int getNumFailures()- Specified by:
getNumFailures
in interfaceUserLoginFailureModel
-
getNumTemporaryLockouts
public int getNumTemporaryLockouts()- Specified by:
getNumTemporaryLockouts
in interfaceUserLoginFailureModel
-
getUserId
- Specified by:
getUserId
in interfaceUserLoginFailureModel
-
getId
- Specified by:
getId
in interfaceUserLoginFailureModel
-
clearFailures
public void clearFailures()- Specified by:
clearFailures
in interfaceUserLoginFailureModel
-
setFailedLoginNotBefore
public void setFailedLoginNotBefore(int notBefore) - Specified by:
setFailedLoginNotBefore
in interfaceUserLoginFailureModel
-
incrementFailures
public void incrementFailures()- Specified by:
incrementFailures
in interfaceUserLoginFailureModel
-
incrementTemporaryLockouts
public void incrementTemporaryLockouts()- Specified by:
incrementTemporaryLockouts
in interfaceUserLoginFailureModel
-
setLastFailure
public void setLastFailure(long lastFailure) - Specified by:
setLastFailure
in interfaceUserLoginFailureModel
-
setLastIPFailure
- Specified by:
setLastIPFailure
in interfaceUserLoginFailureModel
-
isUnchanged
protected boolean isUnchanged()- Specified by:
isUnchanged
in classBaseUpdater<LoginFailureKey,
LoginFailureEntity> - Returns:
true
if the entity was changed after being created/read.
-