Package org.zkoss.zk.ui.util
Class Statistic
java.lang.Object
org.zkoss.zk.ui.util.Statistic
- All Implemented Interfaces:
Monitor
An implementation of
Monitor to accumulate statistic data
in memory.
It has no effect until you specify it in WEB-INF/zk.xml.
- Author:
- tomyeh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterUpdate(Desktop desktop) Called when an asynchronous updated has been processed.voidbeforeUpdate(Desktop desktop, List<AuRequest> requests) Called when an asynchronous updated is called (and not yet processed).voiddesktopCreated(Desktop desktop) Called when a desktop is created.voiddesktopDestroyed(Desktop desktop) Called when a desktop is being destroyed.intReturns the number of active desktops.intReturns the number of active sessions.intReturns the number of active asynchronous updates.doubleReturns the average number of desktops being created in an hour.doubleReturns the average number of sessions being created in an hour.doubleReturns the average number of asynchronous updates being created in an hour.longReturns when the server (actually, this monitor) started.intReturns the total number of desktops that have been created since the server started.intReturns the total number of sessions that have been created since the server started.intReturns the total number of asynchronous updates that have been received since the server started.voidsessionCreated(Session sess) Called when a new session is created.voidsessionDestroyed(Session sess) Called when a session is being destroyed.
-
Constructor Details
-
Statistic
public Statistic()
-
-
Method Details
-
getStartTime
public long getStartTime()Returns when the server (actually, this monitor) started. -
getTotalSessionCount
public int getTotalSessionCount()Returns the total number of sessions that have been created since the server started. -
getActiveSessionCount
public int getActiveSessionCount()Returns the number of active sessions. -
getAverageSessionCount
public double getAverageSessionCount()Returns the average number of sessions being created in an hour. -
getTotalDesktopCount
public int getTotalDesktopCount()Returns the total number of desktops that have been created since the server started. -
getActiveDesktopCount
public int getActiveDesktopCount()Returns the number of active desktops. -
getAverageDesktopCount
public double getAverageDesktopCount()Returns the average number of desktops being created in an hour. -
getTotalUpdateCount
public int getTotalUpdateCount()Returns the total number of asynchronous updates that have been received since the server started. -
getActiveUpdateCount
public int getActiveUpdateCount()Returns the number of active asynchronous updates. -
getAverageUpdateCount
public double getAverageUpdateCount()Returns the average number of asynchronous updates being created in an hour. -
sessionCreated
Description copied from interface:MonitorCalled when a new session is created.- Specified by:
sessionCreatedin interfaceMonitor- Parameters:
sess- the session being created
-
sessionDestroyed
Description copied from interface:MonitorCalled when a session is being destroyed.- Specified by:
sessionDestroyedin interfaceMonitor- Parameters:
sess- the session being destroyed
-
desktopCreated
Description copied from interface:MonitorCalled when a desktop is created.- Specified by:
desktopCreatedin interfaceMonitor- Parameters:
desktop- the desktop being created
-
desktopDestroyed
Description copied from interface:MonitorCalled when a desktop is being destroyed.- Specified by:
desktopDestroyedin interfaceMonitor- Parameters:
desktop- the desktop being destroyed
-
beforeUpdate
Description copied from interface:MonitorCalled when an asynchronous updated is called (and not yet processed).- Specified by:
beforeUpdatein interfaceMonitor- Parameters:
desktop- the desktop that the update is sent torequests- a list ofAuRequestthat are being processed.
-
afterUpdate
Description copied from interface:MonitorCalled when an asynchronous updated has been processed.- Specified by:
afterUpdatein interfaceMonitor- Parameters:
desktop- the desktop that the update is sent to
-