|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PushStatsService
Business service methods relating to managing push statistics.
| 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 pushAppService)
Support for dependency injection. |
void |
setPushStatsBatchUpdaterService(PushStatsBatchUpdaterService pushStatsBatchUpdaterService)
Support for dependency injection. |
void |
setPushStatsDAO(PushStatsDAO pushStatsDAO)
Support for dependency injection. |
| Method Detail |
|---|
void incrementPushStats(String pushApplicationId,
long pushCount,
long contentSum)
throws PushSDKException
pushApplicationId - 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
long getRunningPushCount(String pushApplicationId)
throws PushSDKException
pushApplicationId - id of the push application that the push statistics correspond to
PushSDKException - if any errors occur
long getRunningContentSum(String pushApplicationId)
throws PushSDKException
pushApplicationId - id of the push application that the push statistics correspond to
PushSDKException - if any errors occur
long getRemainingQuota(String pushApplicationId,
boolean preferUseCache)
throws PushSDKException
pushApplicationId - 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
void resetRunningPushCount(String pushApplicationId)
throws PushSDKException
pushApplicationId - id of the push application that the push statistics correspond to
PushSDKException - if any errors occur
void resetRunningContentSum(String pushApplicationId)
throws PushSDKException
pushApplicationId - id of the push application that the push statistics correspond to
PushSDKException - if any errors occurvoid setPushStatsDAO(PushStatsDAO pushStatsDAO)
PushStatsDAO to use.
pushStatsDAO - a Push Stats Data Access Objectvoid setPushApplicationService(PushApplicationService pushAppService)
PushApplicationService collaborating object -
this is used to interface with the business service that manages push applications.
pushAppService - an instance of a PushApplicationService implementation (must be thread safe)void setPushStatsBatchUpdaterService(PushStatsBatchUpdaterService pushStatsBatchUpdaterService)
PushStatsBatchUpdaterService to use.
pushStatsBatchUpdaterService - the Push Stats Batch Updater Service
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||