Class CachedPersistedSessionRepository
- java.lang.Object
-
- de.hybris.platform.servicelayer.web.session.CachedPersistedSessionRepository
-
- All Implemented Interfaces:
org.springframework.session.SessionRepository
public class CachedPersistedSessionRepository extends java.lang.Object implements org.springframework.session.SessionRepository
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSESSION
-
Constructor Summary
Constructors Constructor Description CachedPersistedSessionRepository(org.springframework.core.serializer.Deserializer deserializer, SessionPersister sessionPersister, java.lang.String extension, java.lang.String contextRoot)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseJaloSession(java.lang.String id)protected PersistedSessioncreateCachedPersistedSession()protected PersistedSessioncreateNewSession(java.lang.String id)org.springframework.session.SessioncreateSession()voiddelete(java.lang.String id)static voidexecuteWithoutClosingJaloSessionOnDelete(java.lang.Runnable runnable)Spring Session invalidates session by deleting current one, creating new and copying all attributes.protected PersistedSessiongetCachedPersistedSession(java.lang.String id)org.springframework.session.SessiongetSession(java.lang.String id)protected PersistedSessionloadFromPersistenceAndDeserialize(java.lang.String id)protected voidremoveCachedPersistedSession(java.lang.String id)voidsave(org.springframework.session.Session session)protected voidsaveCachedPersistedSession(org.springframework.session.Session session)
-
-
-
Field Detail
-
SESSION
public static final java.lang.String SESSION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CachedPersistedSessionRepository
public CachedPersistedSessionRepository(org.springframework.core.serializer.Deserializer deserializer, SessionPersister sessionPersister, java.lang.String extension, java.lang.String contextRoot)
-
-
Method Detail
-
createSession
public org.springframework.session.Session createSession()
- Specified by:
createSessionin interfaceorg.springframework.session.SessionRepository
-
save
public void save(org.springframework.session.Session session)
- Specified by:
savein interfaceorg.springframework.session.SessionRepository
-
getSession
public org.springframework.session.Session getSession(java.lang.String id)
- Specified by:
getSessionin interfaceorg.springframework.session.SessionRepository
-
delete
public void delete(java.lang.String id)
- Specified by:
deletein interfaceorg.springframework.session.SessionRepository
-
executeWithoutClosingJaloSessionOnDelete
public static void executeWithoutClosingJaloSessionOnDelete(java.lang.Runnable runnable)
Spring Session invalidates session by deleting current one, creating new and copying all attributes. This method prevents call to CachedPersistedSessionRepository.delete from closing jalosession because it will be copied to new http session and cannot be closed!- Parameters:
runnable- runnable
-
createCachedPersistedSession
protected PersistedSession createCachedPersistedSession()
-
saveCachedPersistedSession
protected void saveCachedPersistedSession(org.springframework.session.Session session)
-
getCachedPersistedSession
protected PersistedSession getCachedPersistedSession(java.lang.String id)
-
removeCachedPersistedSession
protected void removeCachedPersistedSession(java.lang.String id)
-
closeJaloSession
protected void closeJaloSession(java.lang.String id)
-
loadFromPersistenceAndDeserialize
protected PersistedSession loadFromPersistenceAndDeserialize(java.lang.String id)
-
createNewSession
protected PersistedSession createNewSession(java.lang.String id)
-
-