|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.rim.pushsdk.push.stats.PushStatsServiceImpl
public class PushStatsServiceImpl
Implementation of the PushStatsService interface.
| Constructor Summary | |
|---|---|
PushStatsServiceImpl()
|
|
| Method Summary | |
|---|---|
long |
getRemainingQuota(String pushApplicationId,
boolean preferUseCache)
Gets the remaining quota (in number of pushes) for the specified push application. |
long |
getRunningContentSum(String pushApplicationId)
Gets the total bytes of content pushed to the specified push application. |
long |
getRunningPushCount(String pushApplicationId)
Gets a running count of pushes for the specified push application. |
void |
incrementPushStats(String pushApplicationId,
long pushCount,
long contentSum)
Increments the push statistics for a push application by the given push count and total content sum. |
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 |
setPushApplicationService(PushApplicationService pushApplicationService)
Support for dependency injection. |
void |
setPushStatsBatchUpdaterService(PushStatsBatchUpdaterService pushStatsBatchUpdaterService)
Support for dependency injection. |
void |
setPushStatsDAO(PushStatsDAO pushStatsDAO)
Support for dependency injection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PushStatsServiceImpl()
| Method Detail |
|---|
public void setPushStatsDAO(PushStatsDAO pushStatsDAO)
PushStatsServicePushStatsDAO to use.
setPushStatsDAO in interface PushStatsServicepushStatsDAO - a Push Stats Data Access Objectpublic void setPushApplicationService(PushApplicationService pushApplicationService)
PushStatsServicePushApplicationService collaborating object -
this is used to interface with the business service that manages push applications.
setPushApplicationService in interface PushStatsServicepushApplicationService - an instance of a PushApplicationService implementation (must be thread safe)public void setPushStatsBatchUpdaterService(PushStatsBatchUpdaterService pushStatsBatchUpdaterService)
PushStatsServicePushStatsBatchUpdaterService to use.
setPushStatsBatchUpdaterService in interface PushStatsServicepushStatsBatchUpdaterService - the Push Stats Batch Updater Service
public void incrementPushStats(String pushApplicationId,
long pushCount,
long contentSum)
throws PushSDKException
PushStatsService
incrementPushStats in interface PushStatsServicepushApplicationId - id of the push application that the push statistics correspond topushCount - the number of addresses being pushed to in a push request. If one push contains N addresses, the
pushCount will be equal to N.contentSum - the content size of the push multiplied by the number of addresses being pushed to in the push request. If J
bytes of content was sent to N devices, the contentSum will be equal to J * N.
PushSDKException - if any errors occur
public long getRunningPushCount(String pushApplicationId)
throws PushSDKException
PushStatsService
getRunningPushCount in interface PushStatsServicepushApplicationId - id of the push application that the push statistics correspond to
PushSDKException - if any errors occur
public long getRunningContentSum(String pushApplicationId)
throws PushSDKException
PushStatsService
getRunningContentSum in interface PushStatsServicepushApplicationId - id of the push application that the push statistics correspond to
PushSDKException - if any errors occur
public long getRemainingQuota(String pushApplicationId,
boolean preferUseCache)
throws PushSDKException
PushStatsService
getRemainingQuota in interface PushStatsServicepushApplicationId - id of the push application that the push statistics correspond topreferUseCache - 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.
PushSDKException - if any errors occur
public void resetRunningPushCount(String pushApplicationId)
throws PushSDKException
PushStatsService
resetRunningPushCount in interface PushStatsServicepushApplicationId - id of the push application that the push statistics correspond to
PushSDKException - if any errors occur
public void resetRunningContentSum(String pushApplicationId)
throws PushSDKException
PushStatsService
resetRunningContentSum in interface PushStatsServicepushApplicationId - id of the push application that the push statistics correspond to
PushSDKException - if any errors occur
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||