Class | Description |
---|---|
AbstractWebDataEntryProcessor<T> |
A base class for
EntryProcessor s which will use the web data serializer . |
AddSessionEntryProcessor |
Sets the initial reference count to 1.
|
DestroySessionEntryProcessor |
Decrements the reference count for a session, returning
Boolean.TRUE or Boolean.FALSE to
indicate whether the reference count has reached zero. |
InvalidateSessionAttributesEntryProcessor |
Invalidates all attributes for a
destroyed session, removing them
from the clustered map. |
ReferenceSessionEntryProcessor |
Increments the reference count, returning
Boolean.FALSE if the entry does not exist and
Boolean.TRUE otherwise. |
SessionAttributePredicate |
Filters map entries to retrieve only the ones that belong to a specific session.
|
SessionListener |
Pairs with
WebFilter to notify it of HttpSession timeouts. |
WebDataSerializerHook | |
WebFilter |
Provides clustered sessions by backing session data with an
IMap . |
WebFilter.LocalCacheEntry | |
WebFilter.ResponseWrapper |
web.xml
:
<filter>
<filter-name>hazelcastWebFilter</filter-name>
<filter-class>com.hazelcast.web.WebFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>hazelcastWebFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<listener>
<listener-class>com.hazelcast.web.SessionListener</listener-class>
</listener>
WebFilter
should be first in the filter chain to ensure session
actions performed in other filters in the chain are replicated. Additionally, note that both the
WebFilter
and SessionListener
must be registered for clustered sessions to work properly. The SessionListener
informs the
WebFilter
of session timeouts so it can update the cluster accordingly.
WebFilter
supports several <init-param/>
values which can
be used to control its behavior. For more details, check its documentation.Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.