|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.jdbc.core.support.JdbcDaoSupport
net.rim.pushsdk.commons.PushSDKBaseDAO
net.rim.pushsdk.push.stats.PushStatsRDBMSDAOImpl
public class PushStatsRDBMSDAOImpl
RDBMS implementation of the PushStatsDAO interface.
| Field Summary |
|---|
| Fields inherited from class net.rim.pushsdk.commons.PushSDKBaseDAO |
|---|
DATABASE_TZ |
| Fields inherited from class org.springframework.dao.support.DaoSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
PushStatsRDBMSDAOImpl()
|
|
| 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 |
setCache(net.sf.ehcache.Cache cache)
Sets a cache to use to cache PushStats. |
void |
setSqlProperties(SQLProperties sqlProperties)
|
void |
updateCache(PushStats pushStats)
Updates cached push statistics for the push application defined by the push application id of the pushStats parameter of this method. |
int |
updatePushStats(PushStats pushStats)
Updates push statistics for the specified push application. |
| Methods inherited from class net.rim.pushsdk.commons.PushSDKBaseDAO |
|---|
encodeSQLText, encodeSQLText, encodeSQLText, getSimpleJdbcTemplate |
| Methods inherited from class org.springframework.jdbc.core.support.JdbcDaoSupport |
|---|
checkDaoConfig, createJdbcTemplate, getConnection, getDataSource, getExceptionTranslator, getJdbcTemplate, initTemplateConfig, releaseConnection, setDataSource, setJdbcTemplate |
| Methods inherited from class org.springframework.dao.support.DaoSupport |
|---|
afterPropertiesSet, initDao |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PushStatsRDBMSDAOImpl()
| Method Detail |
|---|
public void setSqlProperties(SQLProperties sqlProperties)
public void setCache(net.sf.ehcache.Cache cache)
cache - an instance of a cache
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)
updateCache in interface PushStatsDAOpushStats - the push statistics to update the cache with
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||