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
public class RedisDataStore extends AbstractPersistentPageStore implements 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
Constructors Constructor Description RedisDataStore(String applicationname, IRedisSettings settings)Constructor.RedisDataStore(String applicationname, redis.clients.jedis.JedisPool pool, IRedisSettings settings)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddPersistedPage(String sessionIdentifier, IManageablePage page)voiddestroy()protected IManageablePagegetPersistedPage(String sessionIdentifier, int id)List<IPersistedPage>getPersistedPages(String sessionIdentifier)Set<String>getSessionIdentifiers()BytesgetTotalSize()protected voidremoveAllPersistedPages(String sessionIdentifier)protected voidremovePersistedPage(String sessionIdentifier, IManageablePage page)booleansupportsVersioning()-
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 Detail
-
RedisDataStore
public RedisDataStore(String applicationname, IRedisSettings settings)
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 Detail
-
supportsVersioning
public boolean supportsVersioning()
- Specified by:
supportsVersioningin interfaceIPageStore
-
getPersistedPage
protected IManageablePage getPersistedPage(String sessionIdentifier, int id)
- Specified by:
getPersistedPagein classAbstractPersistentPageStore
-
removePersistedPage
protected void removePersistedPage(String sessionIdentifier, IManageablePage page)
- Specified by:
removePersistedPagein classAbstractPersistentPageStore
-
removeAllPersistedPages
protected void removeAllPersistedPages(String sessionIdentifier)
- Specified by:
removeAllPersistedPagesin classAbstractPersistentPageStore
-
addPersistedPage
protected void addPersistedPage(String sessionIdentifier, IManageablePage page)
- Specified by:
addPersistedPagein classAbstractPersistentPageStore
-
destroy
public void destroy()
- Specified by:
destroyin interfaceIPageStore- Overrides:
destroyin classAbstractPersistentPageStore
-
getSessionIdentifiers
public Set<String> getSessionIdentifiers()
- Specified by:
getSessionIdentifiersin interfaceIPersistentPageStore
-
getPersistedPages
public List<IPersistedPage> getPersistedPages(String sessionIdentifier)
- Specified by:
getPersistedPagesin interfaceIPersistentPageStore
-
getTotalSize
public Bytes getTotalSize()
- Specified by:
getTotalSizein interfaceIPersistentPageStore
-
-