Package org.wicketstuff.datastores.redis
Class RedisDataStore
- java.lang.Object
-
- org.apache.wicket.pageStore.AbstractPersistentPageStore
-
- org.wicketstuff.datastores.redis.RedisDataStore
-
- All Implemented Interfaces:
org.apache.wicket.pageStore.IPageStore,org.apache.wicket.pageStore.IPersistentPageStore
public class RedisDataStore extends org.apache.wicket.pageStore.AbstractPersistentPageStore implements org.apache.wicket.pageStore.IPersistentPageStoreAn IPageStore that saves serialized pages in Redis.
-
-
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, org.apache.wicket.page.IManageablePage page)voiddestroy()protected org.apache.wicket.page.IManageablePagegetPersistedPage(String sessionIdentifier, int id)List<org.apache.wicket.pageStore.IPersistedPage>getPersistedPages(String sessionIdentifier)Set<String>getSessionIdentifiers()org.apache.wicket.util.lang.BytesgetTotalSize()protected voidremoveAllPersistedPages(String sessionIdentifier)protected voidremovePersistedPage(String sessionIdentifier, org.apache.wicket.page.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
-
-
-
-
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 interfaceorg.apache.wicket.pageStore.IPageStore
-
getPersistedPage
protected org.apache.wicket.page.IManageablePage getPersistedPage(String sessionIdentifier, int id)
- Specified by:
getPersistedPagein classorg.apache.wicket.pageStore.AbstractPersistentPageStore
-
removePersistedPage
protected void removePersistedPage(String sessionIdentifier, org.apache.wicket.page.IManageablePage page)
- Specified by:
removePersistedPagein classorg.apache.wicket.pageStore.AbstractPersistentPageStore
-
removeAllPersistedPages
protected void removeAllPersistedPages(String sessionIdentifier)
- Specified by:
removeAllPersistedPagesin classorg.apache.wicket.pageStore.AbstractPersistentPageStore
-
addPersistedPage
protected void addPersistedPage(String sessionIdentifier, org.apache.wicket.page.IManageablePage page)
- Specified by:
addPersistedPagein classorg.apache.wicket.pageStore.AbstractPersistentPageStore
-
destroy
public void destroy()
- Specified by:
destroyin interfaceorg.apache.wicket.pageStore.IPageStore- Overrides:
destroyin classorg.apache.wicket.pageStore.AbstractPersistentPageStore
-
getSessionIdentifiers
public Set<String> getSessionIdentifiers()
- Specified by:
getSessionIdentifiersin interfaceorg.apache.wicket.pageStore.IPersistentPageStore
-
getPersistedPages
public List<org.apache.wicket.pageStore.IPersistedPage> getPersistedPages(String sessionIdentifier)
- Specified by:
getPersistedPagesin interfaceorg.apache.wicket.pageStore.IPersistentPageStore
-
getTotalSize
public org.apache.wicket.util.lang.Bytes getTotalSize()
- Specified by:
getTotalSizein interfaceorg.apache.wicket.pageStore.IPersistentPageStore
-
-