Class SessionStats
- java.lang.Object
-
- org.apache.jackrabbit.oak.jcr.session.SessionStats
-
- All Implemented Interfaces:
SessionMBean
public class SessionStats extends Object implements SessionMBean
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SessionStats.Counters
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.api.jmx.SessionMBean
TYPE
-
-
Constructor Summary
Constructors Constructor Description SessionStats(String sessionId, AuthInfo authInfo, Clock clock, RefreshStrategy refreshStrategy, SessionDelegate sessionDelegate, StatisticManager statisticManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
failedSave(RepositoryException repositoryException)
AuthInfo
getAuthInfo()
SessionStats.Counters
getCounters()
String
getInitStackTrace()
String
getLastFailedSave()
String
getLastReadAccess()
String
getLastRefresh()
String
getLastSave()
String
getLastWriteAccess()
String
getLoginTimeStamp()
long
getReadCount()
double
getReadRate()
long
getRefreshCount()
boolean
getRefreshPending()
double
getRefreshRate()
String
getRefreshStrategy()
long
getSaveCount()
double
getSaveRate()
String[]
getSessionAttributes()
long
getWriteCount()
double
getWriteRate()
void
refresh()
Refresh this session.void
setAttributes(Map<String,Object> attributes)
String
toString()
-
-
-
Constructor Detail
-
SessionStats
public SessionStats(String sessionId, AuthInfo authInfo, Clock clock, RefreshStrategy refreshStrategy, SessionDelegate sessionDelegate, StatisticManager statisticManager)
-
-
Method Detail
-
close
public void close()
-
getCounters
public SessionStats.Counters getCounters()
-
failedSave
public void failedSave(RepositoryException repositoryException)
-
getInitStackTrace
public String getInitStackTrace()
- Specified by:
getInitStackTrace
in interfaceSessionMBean
- Returns:
- stack trace from where the session was acquired.
-
getAuthInfo
public AuthInfo getAuthInfo()
- Specified by:
getAuthInfo
in interfaceSessionMBean
- Returns:
AuthInfo
for the user associated with the session.
-
getLoginTimeStamp
public String getLoginTimeStamp()
- Specified by:
getLoginTimeStamp
in interfaceSessionMBean
- Returns:
- time stamp from when the session was acquired.
-
getLastReadAccess
public String getLastReadAccess()
- Specified by:
getLastReadAccess
in interfaceSessionMBean
- Returns:
- time stamp from the last read access
-
getReadCount
public long getReadCount()
- Specified by:
getReadCount
in interfaceSessionMBean
- Returns:
- number of read accesses
-
getReadRate
public double getReadRate()
- Specified by:
getReadRate
in interfaceSessionMBean
- Returns:
- read operations per time
-
getLastWriteAccess
public String getLastWriteAccess()
- Specified by:
getLastWriteAccess
in interfaceSessionMBean
- Returns:
- time stamp from the last write access
-
getWriteCount
public long getWriteCount()
- Specified by:
getWriteCount
in interfaceSessionMBean
- Returns:
- number of write accesses
-
getWriteRate
public double getWriteRate()
- Specified by:
getWriteRate
in interfaceSessionMBean
- Returns:
- write operations per time
-
getLastRefresh
public String getLastRefresh()
- Specified by:
getLastRefresh
in interfaceSessionMBean
- Returns:
- time stamp from the last refresh
-
getRefreshStrategy
public String getRefreshStrategy()
- Specified by:
getRefreshStrategy
in interfaceSessionMBean
- Returns:
- description of the refresh strategy
-
getRefreshPending
public boolean getRefreshPending()
- Specified by:
getRefreshPending
in interfaceSessionMBean
- Returns:
true
iff the session will be refreshed on next access.
-
getRefreshCount
public long getRefreshCount()
- Specified by:
getRefreshCount
in interfaceSessionMBean
- Returns:
- number of refresh operations
-
getRefreshRate
public double getRefreshRate()
- Specified by:
getRefreshRate
in interfaceSessionMBean
- Returns:
- refresh operations per time
-
getLastSave
public String getLastSave()
- Specified by:
getLastSave
in interfaceSessionMBean
- Returns:
- time stamp from the last save
-
getSaveCount
public long getSaveCount()
- Specified by:
getSaveCount
in interfaceSessionMBean
- Returns:
- number of save operations
-
getSaveRate
public double getSaveRate()
- Specified by:
getSaveRate
in interfaceSessionMBean
- Returns:
- save operations per time
-
getSessionAttributes
public String[] getSessionAttributes()
- Specified by:
getSessionAttributes
in interfaceSessionMBean
- Returns:
- attributes associated with the session
-
getLastFailedSave
public String getLastFailedSave()
- Specified by:
getLastFailedSave
in interfaceSessionMBean
- Returns:
- stack trace of the last exception that occurred during a save operation
-
refresh
public void refresh()
Description copied from interface:SessionMBean
Refresh this session. Warning: this operation might be disruptive to the owner of this session- Specified by:
refresh
in interfaceSessionMBean
-
-