net.rim.pushsdk.push.stats
Class PushStatsMemoryDataStore

java.lang.Object
  extended by net.rim.pushsdk.push.stats.PushStatsMemoryDataStore

public class PushStatsMemoryDataStore
extends Object

Represents in-memory storage of push stats data.

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

Author:
mdandrea

Constructor Summary
PushStatsMemoryDataStore()
           
 
Method Summary
 PushStats loadFromStore(String appId)
          Loads a push stats object from in-memory storage.
 List<String> loadKeysFromStore()
          Loads the keys (app ids) for the push stats currently in memory.
 PushStats removeFromStore(String appId)
          Removes a push stats object from memory.
 void saveInStore(String appId, PushStats pushStats)
          Saves a push stats object in memory.
 void setCache(net.sf.ehcache.Cache cache)
          Sets the cache to be used for storing push stats data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PushStatsMemoryDataStore

public PushStatsMemoryDataStore()
Method Detail

setCache

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

Parameters:
cache - the cache for storing push stats data

loadFromStore

public PushStats loadFromStore(String appId)
Loads a push stats object from in-memory storage.

Parameters:
appId - the id of the push application
Returns:
the loaded push stats

loadKeysFromStore

public List<String> loadKeysFromStore()
Loads the keys (app ids) for the push stats currently in memory.

Returns:
the keys (app ids)

saveInStore

public void saveInStore(String appId,
                        PushStats pushStats)
Saves a push stats object in memory.

Parameters:
appId - the id of the push application
pushStats - the push stats object to be stored

removeFromStore

public PushStats removeFromStore(String appId)
Removes a push stats object from memory.

Parameters:
appId - the id of the push application
Returns:
the push stats object that was removed


Copyright © 2011 Research In Motion. All Rights Reserved.