Class MemoryHttpSessionStore
java.lang.Object
net.officefloor.web.session.store.MemoryHttpSessionStore
- All Implemented Interfaces:
HttpSessionStore
HttpSessionStore that contains state of the HttpSession
within memory.
This is a very basic implementation that keeps all HttpSession
instances in memory. Though this may provide a very fast solution it suffers
from issues such as:
OutOfMemoryErrorif too many/largeHttpSessioninstances- state is not shared with other JVMs (especially for clustered environments)
This is useful in light load testing environments (such as unit tests).
- Author:
- Daniel Sagenschneider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateHttpSession(CreateHttpSessionOperation operation) Triggers creating new details for aHttpSession.voidTriggers invalidating theHttpSession.voidretrieveHttpSession(RetrieveHttpSessionOperation operation) Triggers retrieving theHttpSessiondetails.voidstoreHttpSession(StoreHttpSessionOperation operation) Triggers storing theHttpSessiondetails.
-
Constructor Details
-
MemoryHttpSessionStore
Initiate.- Parameters:
clock-Clockfor determiningHttpSessiontimes.maxIdleTime- Maximum idle time in seconds before expiring theHttpSession.
-
-
Method Details
-
createHttpSession
Description copied from interface:HttpSessionStoreTriggers creating new details for aHttpSession.- Specified by:
createHttpSessionin interfaceHttpSessionStore- Parameters:
operation- Operation to receive results of creation.
-
retrieveHttpSession
Description copied from interface:HttpSessionStoreTriggers retrieving theHttpSessiondetails.- Specified by:
retrieveHttpSessionin interfaceHttpSessionStore- Parameters:
operation- Operation to receive results of the retrieval.
-
storeHttpSession
Description copied from interface:HttpSessionStoreTriggers storing theHttpSessiondetails.- Specified by:
storeHttpSessionin interfaceHttpSessionStore- Parameters:
operation- Operations to receive the results of the storage.
-
invalidateHttpSession
Description copied from interface:HttpSessionStoreTriggers invalidating theHttpSession.- Specified by:
invalidateHttpSessionin interfaceHttpSessionStore- Parameters:
operation- Operation to invalidate theHttpSession.
-