ERMailSender.Stats Class Reference

Collaboration diagram for ERMailSender.Stats:

Collaboration graph
[legend]

List of all members.

Public Member Functions

synchronized int currentQueueSize ()
synchronized int errorCount ()
String formattedPeakMemoryUsage ()
String formattedUsedMemory ()
NSTimestamp lastResetTime ()
synchronized int mailCount ()
double peakMemoryUsage ()
synchronized void reset ()
 Stats ()
String toString ()
long usedMemory ()

Private Member Functions

void incrementErrorCount ()
void incrementMailCount ()
void updateMemoryUsage ()

Private Attributes

ERXUnitAwareDecimalFormat _decimalFormatter
double _peakMemoryUsage = 0.0d
Runtime _runtime
int errorCount = 0
NSTimestamp lastResetTime = new NSTimestamp()
int mailCount = 0


Detailed Description

This class is about logging mail event for stats purposes. More stats to come in the future.

Constructor & Destructor Documentation

Stats (  ) 


Member Function Documentation

synchronized int currentQueueSize (  ) 

Returns:
the current queue size. This method is useful for simplistic load balancing between apps that are supposed to send mails

synchronized int errorCount (  ) 

Returns:
the count of error that were encountered during mail seonding process

String formattedPeakMemoryUsage (  ) 

String formattedUsedMemory (  ) 

void incrementErrorCount (  )  [private]

void incrementMailCount (  )  [private]

NSTimestamp lastResetTime (  ) 

Returns:
the timestamp that respresents when the stats object was reset.

synchronized int mailCount (  ) 

Returns:
the total count of mails being sent. This number does not take in accordance the number of errors. To get the actual count of mail sent without error use 'errorCount - mailCount'.

double peakMemoryUsage (  ) 

synchronized void reset (  ) 

Resets statistics information

String toString (  ) 

Returns:
a string representation of the Stats object.

void updateMemoryUsage (  )  [private]

long usedMemory (  ) 


Member Data Documentation

double _peakMemoryUsage = 0.0d [private]

Runtime _runtime [private]

int errorCount = 0 [private]

NSTimestamp lastResetTime = new NSTimestamp() [private]

int mailCount = 0 [private]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:22 2012 for Project Wonder by  doxygen 1.5.8