Package org.wicketstuff.datastores.redis
Class RedisDataStore
java.lang.Object
org.apache.wicket.pageStore.AbstractPersistentPageStore
org.wicketstuff.datastores.redis.RedisDataStore
- All Implemented Interfaces:
IPageStore
,IPersistentPageStore
An IPageStore that saves serialized pages in Redis.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.wicket.pageStore.AbstractPersistentPageStore
AbstractPersistentPageStore.PersistedPage
-
Constructor Summary
ConstructorsConstructorDescriptionRedisDataStore
(String applicationname, IRedisSettings settings) Constructor.RedisDataStore
(String applicationname, redis.clients.jedis.JedisPool pool, IRedisSettings settings) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addPersistedPage
(String sessionIdentifier, IManageablePage page) void
destroy()
protected IManageablePage
getPersistedPage
(String sessionIdentifier, int id) getPersistedPages
(String sessionIdentifier) protected void
removeAllPersistedPages
(String sessionIdentifier) protected void
removePersistedPage
(String sessionIdentifier, IManageablePage page) boolean
Methods inherited from class org.apache.wicket.pageStore.AbstractPersistentPageStore
addPage, canBeAsynchronous, createSessionIdentifier, getPage, getSessionIdentifier, removeAllPages, removePage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.wicket.pageStore.IPageStore
addPage, canBeAsynchronous, detach, end, getPage, removeAllPages, removePage, revertPage
Methods inherited from interface org.apache.wicket.pageStore.IPersistentPageStore
getSessionIdentifier
-
Constructor Details
-
RedisDataStore
Constructor. Creates a connection pool by using the hostname and port from the provided settings- Parameters:
settings
- The various settings
-
RedisDataStore
public RedisDataStore(String applicationname, redis.clients.jedis.JedisPool pool, IRedisSettings settings) Constructor.- Parameters:
pool
- The pool with Jedis connectionssettings
- The various settings
-
-
Method Details
-
supportsVersioning
public boolean supportsVersioning()- Specified by:
supportsVersioning
in interfaceIPageStore
-
getPersistedPage
- Specified by:
getPersistedPage
in classAbstractPersistentPageStore
-
removePersistedPage
- Specified by:
removePersistedPage
in classAbstractPersistentPageStore
-
removeAllPersistedPages
- Specified by:
removeAllPersistedPages
in classAbstractPersistentPageStore
-
addPersistedPage
- Specified by:
addPersistedPage
in classAbstractPersistentPageStore
-
destroy
public void destroy()- Specified by:
destroy
in interfaceIPageStore
- Overrides:
destroy
in classAbstractPersistentPageStore
-
getSessionIdentifiers
- Specified by:
getSessionIdentifiers
in interfaceIPersistentPageStore
-
getPersistedPages
- Specified by:
getPersistedPages
in interfaceIPersistentPageStore
-
getTotalSize
- Specified by:
getTotalSize
in interfaceIPersistentPageStore
-