Class SessionMonitoringStore
- java.lang.Object
-
- com.iplanet.dpro.session.monitoring.SessionMonitoringStore
-
@Singleton public class SessionMonitoringStore extends Object
The store for session monitoring information. Each of the operations which can be applied to sessions (refresh, setProperty, destroy and logout) have their own store, which maps the session type (e.g. REMOTE or LOCAL) to theSessionMonitoringTimingStore. This timing store contains a (configurable) number of the most-recentSessionTimingEntrysamples, which can be used to calculate e.g. the slowest, or average speed of a given operation. Uses an ExecutorService to perform writes out to the store (which may block).
-
-
Field Summary
Fields Modifier and Type Field Description static StringEXECUTOR_BINDING_NAME
-
Constructor Summary
Constructors Constructor Description SessionMonitoringStore(ExecutorService executorService, SessionMonitoringTimingStoreFactory sessionMonitoringTimingStoreFactory)Guice-powered constructor, setting ourselves up with an executor service (which we will use to offload our monitoring writes).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetAverageDestroyTime(SessionMonitorType type)Gets the average value of entries in the destroyStore.longgetAverageLogoutTime(SessionMonitorType type)Gets the average value of entries in the logoutStore.longgetAverageRefreshTime(SessionMonitorType type)Gets the average value of entries in the refreshStore.longgetAverageSetPropertyTime(SessionMonitorType type)Gets the average value of entries in the propertyStore.voidstoreDestroyTime(long duration, SessionMonitorType type)Stores an entry in the destroyStore, offloading the work to another thread.voidstoreLogoutTime(long duration, SessionMonitorType type)Stores an entry in the logoutStore, offloading the work to another thread.voidstoreRefreshTime(long duration, SessionMonitorType type)Stores an entry in the refreshStore, offloading the work to another thread.voidstoreSetPropertyTime(long duration, SessionMonitorType type)Stores an entry in the propertyStore, offloading the work to another thread.
-
-
-
Field Detail
-
EXECUTOR_BINDING_NAME
public static final String EXECUTOR_BINDING_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SessionMonitoringStore
@Inject public SessionMonitoringStore(@Named("SESSION_MONITORING_EXECUTOR") ExecutorService executorService, SessionMonitoringTimingStoreFactory sessionMonitoringTimingStoreFactory)Guice-powered constructor, setting ourselves up with an executor service (which we will use to offload our monitoring writes). We generate a new synchronized map at construction time ready for monitoring data to be pushed in.- Parameters:
executorService- the service to which to offload out writes
-
-
Method Detail
-
storeRefreshTime
public void storeRefreshTime(long duration, SessionMonitorType type)Stores an entry in the refreshStore, offloading the work to another thread.- Parameters:
duration- the length of time the new entry representstype- the type of session to which this entry pertains
-
getAverageRefreshTime
public long getAverageRefreshTime(SessionMonitorType type)
Gets the average value of entries in the refreshStore.- Parameters:
type- the type of session whose averages we are interested in- Returns:
- the average duration (in nanoseconds)
-
storeSetPropertyTime
public void storeSetPropertyTime(long duration, SessionMonitorType type)Stores an entry in the propertyStore, offloading the work to another thread.- Parameters:
duration- the length of time the new entry representstype- the type of session to which this entry pertains
-
getAverageSetPropertyTime
public long getAverageSetPropertyTime(SessionMonitorType type)
Gets the average value of entries in the propertyStore.- Parameters:
type- the type of session whose averages we are interested in- Returns:
- the average duration (in nanoseconds)
-
storeDestroyTime
public void storeDestroyTime(long duration, SessionMonitorType type)Stores an entry in the destroyStore, offloading the work to another thread.- Parameters:
duration- the length of time the new entry representstype- the type of session to which this entry pertains
-
getAverageDestroyTime
public long getAverageDestroyTime(SessionMonitorType type)
Gets the average value of entries in the destroyStore.- Parameters:
type- the type of session whose averages we are interested in- Returns:
- the average duration (in nanoseconds)
-
storeLogoutTime
public void storeLogoutTime(long duration, SessionMonitorType type)Stores an entry in the logoutStore, offloading the work to another thread.- Parameters:
duration- the length of time the new entry representstype- the type of session to which this entry pertains
-
getAverageLogoutTime
public long getAverageLogoutTime(SessionMonitorType type)
Gets the average value of entries in the logoutStore.- Parameters:
type- the type of session whose averages we are interested in- Returns:
- the average duration (in nanoseconds)
-
-