|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.rim.pushsdk.subscription.SubMemoryDataStore
public class SubMemoryDataStore
Represents in-memory storage of subscriber data. The in-memory storage is persisted to a disk store on shutdown and read from the disk store on startup.
Warning: For testing use only. It is not meant for production use.
| Constructor Summary | |
|---|---|
SubMemoryDataStore()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Flushes the cache to disk. |
Subscriber |
loadFromStore(SubscriberPrimaryKey key)
Loads a subscriber from in-memory storage. |
List<SubscriberPrimaryKey> |
loadKeysFromStore()
Loads the keys for the subscribers currently in memory. |
Subscriber |
removeFromStore(SubscriberPrimaryKey key)
Removes a subscriber from memory. |
void |
saveInStore(SubscriberPrimaryKey key,
Subscriber subscriber)
Saves a subscriber in memory. |
void |
setCache(net.sf.ehcache.Cache cache)
Sets the cache to be used for storing subscriber data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SubMemoryDataStore()
| Method Detail |
|---|
public void setCache(net.sf.ehcache.Cache cache)
cache - the cache for storing subscriber datapublic void destroy()
public Subscriber loadFromStore(SubscriberPrimaryKey key)
key - the key of the subscriber to look up
public List<SubscriberPrimaryKey> loadKeysFromStore()
public void saveInStore(SubscriberPrimaryKey key,
Subscriber subscriber)
key - the key of the subscribersubscriber - the subscriber to be storedpublic Subscriber removeFromStore(SubscriberPrimaryKey key)
key - the key of the subscriber
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||