|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.rim.pushsdk.push.stats.PushStatsMemoryDAOImpl
public class PushStatsMemoryDAOImpl
Memory implementation of the PushStatsDAO interface.
Example of using this object outside of the Spring bean factory: PushStatsDAO dao = new PushStatsMemoryDAOImpl(); dao.setPushMemoryDataStore(...); Now you can use the object... dao.someMethod(...);Warning: This class is not intended for production use. Dependencies that must be injected to properly initialize this object for use:
| Constructor Summary | |
|---|---|
PushStatsMemoryDAOImpl()
|
|
| Method Summary | |
|---|---|
void |
addPushStats(PushStats pushStats)
Adds push statistics for the push application with the specified id and provided running push count, running content sum, and daily push count. |
int[] |
batchUpdatePushStats(Map<String,PushStats> pushStatsMap)
Performs a batch update of push statistics for various push applications. |
PushStats |
getPushStats(String pushApplicationId,
boolean preferUseCache)
Gets push statistics for the specified push application. |
void |
resetRunningContentSum(String pushApplicationId)
Resets the running content sum pushed to the specified push application. |
void |
resetRunningPushCount(String pushApplicationId)
Resets the running push count for the specified push application. |
void |
setPushAppMemoryDataStore(PushAppMemoryDataStore pushAppMemoryDataStore)
Sets the in-memory data store to use for storing push applications. |
void |
setPushStatsMemoryDataStore(PushStatsMemoryDataStore pushStatsMemoryDataStore)
Sets the in-memory data store to use for storing push stats. |
void |
updateCache(PushStats pushStats)
Updates the cache with the given push stats. |
int |
updatePushStats(PushStats pushStats)
Updates push statistics for the specified push application. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PushStatsMemoryDAOImpl()
| Method Detail |
|---|
public void setPushStatsMemoryDataStore(PushStatsMemoryDataStore pushStatsMemoryDataStore)
pushStatsMemoryDataStore - push stats in-memory data storepublic void setPushAppMemoryDataStore(PushAppMemoryDataStore pushAppMemoryDataStore)
pushAppMemoryDataStore - push application in-memory data store
public void addPushStats(PushStats pushStats)
throws org.springframework.dao.DataAccessException
PushStatsDAO
addPushStats in interface PushStatsDAOpushStats - push statistics that contain id of the push application, running push count, running content sum, and daily push
count
org.springframework.dao.DataAccessException - if any data access errors occur
public int updatePushStats(PushStats pushStats)
throws org.springframework.dao.DataAccessException
PushStatsDAO
updatePushStats in interface PushStatsDAOpushStats - push statistics that contain id of the push application, running push count, running content sum, and daily push
count
addPushStats.
org.springframework.dao.DataAccessException - if any data access errors occur
public int[] batchUpdatePushStats(Map<String,PushStats> pushStatsMap)
throws org.springframework.dao.DataAccessException
PushStatsDAO
batchUpdatePushStats in interface PushStatsDAOpushStatsMap - the push stats to update in storage
org.springframework.dao.DataAccessException - if any data access errors occur
public PushStats getPushStats(String pushApplicationId,
boolean preferUseCache)
throws org.springframework.dao.DataAccessException
PushStatsDAO
getPushStats in interface PushStatsDAOpushApplicationId - id of the push applicationpreferUseCache - specifies whether the cached value of the remaining quota is preferable or not. In the first case (
preferUseCache is equal to true), the method will try to retrieve the remaining quota
from the cache first. If there is no cached value found, a look up in the persistent store will be done. If
preferUseCache is equal to false, the remaining quota will always be retrieved from
the persistent store. Using the cache will generally be a faster operation. Note: Retrieving the remaining quota
from the persistent store can be somewhat inaccurate. Updates to the push statistics in storage are batched and
persisted at a regular interval and so the stats might be slightly off within that interval.
org.springframework.dao.DataAccessException - if any data access errors occur
public void resetRunningPushCount(String pushApplicationId)
throws org.springframework.dao.DataAccessException
PushStatsDAO
resetRunningPushCount in interface PushStatsDAOpushApplicationId - id of the push application
org.springframework.dao.DataAccessException - if any data access errors occur
public void resetRunningContentSum(String pushApplicationId)
throws org.springframework.dao.DataAccessException
PushStatsDAO
resetRunningContentSum in interface PushStatsDAOpushApplicationId - id of the push application
org.springframework.dao.DataAccessException - if any data access errors occurpublic void updateCache(PushStats pushStats)
PushStatsDAO
updateCache in interface PushStatsDAOpushStats - the push stats to updated the cache with
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||