Class DatabaseRemember
java.lang.Object
rife.database.DbQueryManager
rife.authentication.remembermanagers.DatabaseRemember
- All Implemented Interfaces:
- Cloneable,- RememberManager
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected String_createRememberId(Insert createRememberId, long userId) protected void_eraseAllRememberIds(Delete eraseAllRememberIds) protected boolean_eraseRememberId(Delete eraseRememberId, String rememberId) protected boolean_eraseUserRememberIds(Delete eraseUserRememberIds, long userId) protected long_getRememberedUserId(Select getRememberedUserId, String rememberId) protected boolean_install(CreateTable createRemember, String createRememberMomentIndex) protected void_purgeRememberIds(Delete purgeRememberIds) protected booleanlongObtains the maximum time that a remember ID can be used before it becomes invalid.intObtains the frequency at which the purging will happen in relationship to the scale.intObtains the scale at which the purging will happen in relationship to the frequency.abstract booleaninstall()abstract booleanremove()voidsetRememberDuration(long milliseconds) Sets the maximum time that a remember ID can be used before it becomes invalid.voidsetRememberPurgeFrequency(int frequency) Set the frequency at which the purging will happen in relationship to the scale.voidsetRememberPurgeScale(int scale) Set the scale at which the purging will happen in relationship to the frequency.Methods inherited from class rife.database.DbQueryManagerclone, executeFetchAll, executeFetchAll, executeFetchAll, executeFetchAll, executeFetchAllBeans, executeFetchAllBeans, executeFetchFirst, executeFetchFirst, executeFetchFirst, executeFetchFirst, executeFetchFirstBean, executeFetchFirstBean, executeGetFirstBoolean, executeGetFirstBoolean, executeGetFirstByte, executeGetFirstByte, executeGetFirstBytes, executeGetFirstBytes, executeGetFirstDate, executeGetFirstDate, executeGetFirstDate, executeGetFirstDate, executeGetFirstDouble, executeGetFirstDouble, executeGetFirstFloat, executeGetFirstFloat, executeGetFirstInt, executeGetFirstInt, executeGetFirstLong, executeGetFirstLong, executeGetFirstShort, executeGetFirstShort, executeGetFirstString, executeGetFirstString, executeGetFirstTime, executeGetFirstTime, executeGetFirstTime, executeGetFirstTime, executeGetFirstTimestamp, executeGetFirstTimestamp, executeGetFirstTimestamp, executeGetFirstTimestamp, executeHasResultRows, executeHasResultRows, executeQuery, executeQuery, executeResultQuery, executeUpdate, executeUpdate, executeUpdate, executeUseFirstAsciiStream, executeUseFirstAsciiStream, executeUseFirstBinaryStream, executeUseFirstBinaryStream, executeUseFirstCharacterStream, executeUseFirstCharacterStream, fetch, fetch, fetch, fetchAll, fetchAll, getConnection, getDatasource, inTransaction, inTransaction, reserveConnectionMethods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface rife.authentication.RememberManagercreateRememberId, eraseAllRememberIds, eraseRememberId, eraseUserRememberIds, getRememberedUserId, purgeRememberIds
- 
Constructor Details- 
DatabaseRemember
 
- 
- 
Method Details- 
getRememberDurationpublic long getRememberDuration()Description copied from interface:RememberManagerObtains the maximum time that a remember ID can be used before it becomes invalid.- Specified by:
- getRememberDurationin interface- RememberManager
- Returns:
- The maximum lifetime in milliseconds.
 
- 
setRememberDurationpublic void setRememberDuration(long milliseconds) Description copied from interface:RememberManagerSets the maximum time that a remember ID can be used before it becomes invalid.- Specified by:
- setRememberDurationin interface- RememberManager
- Parameters:
- milliseconds- The lifetime in milliseconds.
 
- 
getRememberPurgeFrequencypublic int getRememberPurgeFrequency()Description copied from interface:RememberManagerObtains the frequency at which the purging will happen in relationship to the scale.This defaults to RifeConfig.AuthenticationConfig.getRememberPurgeFrequency().- Specified by:
- getRememberPurgeFrequencyin interface- RememberManager
- Returns:
- the purge frequency
- See Also:
 
- 
setRememberPurgeFrequencypublic void setRememberPurgeFrequency(int frequency) Description copied from interface:RememberManagerSet the frequency at which the purging will happen in relationship to the scale.By default, the frequency and scale respectively are 20 and 1000, which means that the purging will have once every fifty times the remember sessions are accessed. - Specified by:
- setRememberPurgeFrequencyin interface- RememberManager
- Parameters:
- frequency- the purge frequency
- See Also:
 
- 
getRememberPurgeScalepublic int getRememberPurgeScale()Description copied from interface:RememberManagerObtains the scale at which the purging will happen in relationship to the frequency.This defaults to RifeConfig.AuthenticationConfig.getRememberPurgeScale().- Specified by:
- getRememberPurgeScalein interface- RememberManager
- Returns:
- the purge scale
- See Also:
 
- 
setRememberPurgeScalepublic void setRememberPurgeScale(int scale) Description copied from interface:RememberManagerSet the scale at which the purging will happen in relationship to the frequency.By default, the frequency and scale respectively are 20 and 1000, which means that the purging will have once every fifty times the remember sessions are accessed. - Specified by:
- setRememberPurgeScalein interface- RememberManager
- Parameters:
- scale- the purge scale
- See Also:
 
- 
install- Throws:
- RememberManagerException
 
- 
remove- Throws:
- RememberManagerException
 
- 
_install
- 
_remove
- 
_createRememberIdprotected String _createRememberId(Insert createRememberId, long userId) throws RememberManagerException - Throws:
- RememberManagerException
 
- 
_eraseRememberIdprotected boolean _eraseRememberId(Delete eraseRememberId, String rememberId) throws RememberManagerException - Throws:
- RememberManagerException
 
- 
_eraseUserRememberIdsprotected boolean _eraseUserRememberIds(Delete eraseUserRememberIds, long userId) throws RememberManagerException - Throws:
- RememberManagerException
 
- 
_eraseAllRememberIds- Throws:
- RememberManagerException
 
- 
_getRememberedUserIdprotected long _getRememberedUserId(Select getRememberedUserId, String rememberId) throws RememberManagerException - Throws:
- RememberManagerException
 
- 
_purgeRememberIds- Throws:
- RememberManagerException
 
 
-