Package de.xima.fc.security.cache
Class LoginCache
- java.lang.Object
-
- de.xima.fc.security.cache.LoginCache
-
public class LoginCache extends Object
Cache storing user login attempts.- Since:
- 8.0.0
- Author:
- XIMA Media GmbH
-
-
Field Summary
Fields Modifier and Type Field Description static StringCACHE_NAMEName of the login cache.
-
Constructor Summary
Constructors Constructor Description LoginCache()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static LoginAttemptaddLoginAttempt(String loginId)static org.apache.commons.configuration2.event.EventListener<org.apache.commons.configuration2.builder.ConfigurationBuilderResultCreatedEvent>getConfigurationChangeListener()Deprecated.This is meant only for internal use by this class.static org.ehcache.Cache<String,LoginAttempt>getInstance()static LoginAttemptgetLoginAttempts(String loginId)static longgetLoginCount()static voidinit()static voidreinit()Reinitialize cache after configuration changestatic LoginAttemptsetLoginAttempts(String loginId, long count)static voidshutdown()Removes the cache instancestatic voidupdateLoginCount()
-
-
-
Field Detail
-
CACHE_NAME
public static final String CACHE_NAME
Name of the login cache.- See Also:
- Constant Field Values
-
-
Method Detail
-
addLoginAttempt
public static LoginAttempt addLoginAttempt(String loginId)
-
getConfigurationChangeListener
@Deprecated public static org.apache.commons.configuration2.event.EventListener<org.apache.commons.configuration2.builder.ConfigurationBuilderResultCreatedEvent> getConfigurationChangeListener()
Deprecated.This is meant only for internal use by this class.- Returns:
- The listener for when the application properties have changed. Reinitializes this cache.
-
getInstance
public static org.ehcache.Cache<String,LoginAttempt> getInstance()
-
getLoginAttempts
public static LoginAttempt getLoginAttempts(String loginId)
-
getLoginCount
public static long getLoginCount()
-
init
public static void init()
-
reinit
public static void reinit()
Reinitialize cache after configuration change
-
setLoginAttempts
public static LoginAttempt setLoginAttempts(String loginId, long count)
-
shutdown
public static void shutdown()
Removes the cache instance
-
updateLoginCount
public static void updateLoginCount()
-
-