net.rim.pushsdk.push.stats
Interface PushStatsBatchUpdaterService

All Superinterfaces:
Runnable
All Known Implementing Classes:
PushStatsBatchUpdaterServiceImpl

public interface PushStatsBatchUpdaterService
extends Runnable

Performs a batch update of push statistics to storage.

Author:
mdandrea

Method Summary
 void addPushStatsUpdate(PushStats pushStats)
          Adds a push stats object to the list of updates to be batched.
 void destroy()
          Attempts to stop threads when the bean is destroyed.
 int getPushStatsQueueSize()
          Returns the size of the queue holding push stats waiting to be batched and processed.
 void resetRunningContentSum(String pushApplicationId)
          When a reset is called, find all push stats objects in the list of updates and set their contribution to the running content sum to 0.
 void resetRunningPushCount(String pushApplicationId)
          When a reset is called, find all push stats objects in the list of updates and set their contribution to the running push count to 0.
 void run()
          Performs a batch update of several push stats objects to storage.
 void setPushSDKProperties(PushSDKProperties pushSDKProperties)
          Support for dependency injection.
 void setPushStatsDAO(PushStatsDAO pushStatsDAO)
          Support for dependency injection.
 

Method Detail

addPushStatsUpdate

void addPushStatsUpdate(PushStats pushStats)
Adds a push stats object to the list of updates to be batched.

Parameters:
pushStats - the push stats object

run

void run()
Performs a batch update of several push stats objects to storage.

Specified by:
run in interface Runnable

resetRunningPushCount

void resetRunningPushCount(String pushApplicationId)
When a reset is called, find all push stats objects in the list of updates and set their contribution to the running push count to 0.

Parameters:
pushApplicationId - the push application id

resetRunningContentSum

void resetRunningContentSum(String pushApplicationId)
When a reset is called, find all push stats objects in the list of updates and set their contribution to the running content sum to 0.

Parameters:
pushApplicationId - the push application id

getPushStatsQueueSize

int getPushStatsQueueSize()
Returns the size of the queue holding push stats waiting to be batched and processed.

Returns:
the size of the push stats queue

destroy

void destroy()
Attempts to stop threads when the bean is destroyed.


setPushStatsDAO

void setPushStatsDAO(PushStatsDAO pushStatsDAO)
Support for dependency injection. Sets the PushStatsDAO to use.

Parameters:
pushStatsDAO - the Push Stats Data Access Object

setPushSDKProperties

void setPushSDKProperties(PushSDKProperties pushSDKProperties)
Support for dependency injection. This will override the default PushSDKProperties implementation.

Parameters:
pushSDKProperties - the Push SDK Properties


Copyright © 2011 Research In Motion. All Rights Reserved.