net.rim.pushsdk.push.request
Class PushRequestDetailMemoryDataStore

java.lang.Object
  extended by net.rim.pushsdk.push.request.PushRequestDetailMemoryDataStore

public class PushRequestDetailMemoryDataStore
extends Object

Represents in-memory storage of push request detail data.

Warning: For testing use only. It is not meant for production use.

Author:
mdandrea

Constructor Summary
PushRequestDetailMemoryDataStore()
           
 
Method Summary
 List<PushRequestDetail> loadAllFromStore()
          Loads all the push request details from the in-memory storage.
 PushRequestDetail loadFromStore(String key)
          Loads a push request detail from in-memory storage.
 List<String> loadKeysFromStore()
          Loads the keys for the push request details currently in memory.
 PushRequestDetail removeFromStore(String key)
          Removes a push request detail from memory.
 void saveInStore(String key, PushRequestDetail pushRequestDetail)
          Saves a push request detail in memory.
 void setCache(net.sf.ehcache.Cache cache)
          Sets the cache to be used for storing push request detail data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PushRequestDetailMemoryDataStore

public PushRequestDetailMemoryDataStore()
Method Detail

setCache

public void setCache(net.sf.ehcache.Cache cache)
Sets the cache to be used for storing push request detail data. This should not be null.

Parameters:
cache - the cache for storing push request detail data

loadFromStore

public PushRequestDetail loadFromStore(String key)
Loads a push request detail from in-memory storage.

Parameters:
key - the key of the push request detail
Returns:
the loaded push request detail

loadAllFromStore

public List<PushRequestDetail> loadAllFromStore()
Loads all the push request details from the in-memory storage.

Returns:
the loaded push request details

loadKeysFromStore

public List<String> loadKeysFromStore()
Loads the keys for the push request details currently in memory.

Returns:
the keys

saveInStore

public void saveInStore(String key,
                        PushRequestDetail pushRequestDetail)
Saves a push request detail in memory.

Parameters:
key - the key of the push request detail
pushRequestDetail - the push request detail to be stored

removeFromStore

public PushRequestDetail removeFromStore(String key)
Removes a push request detail from memory.

Parameters:
key - the key of the push request detail
Returns:
the push request detail that was removed


Copyright © 2011 Research In Motion. All Rights Reserved.