OpenSslSessionStats Class — netty Architecture
Architecture documentation for the OpenSslSessionStats class in OpenSslSessionStats.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c697bbe5_cfab_cde7_97a5_6adada18acbc["OpenSslSessionStats"] 3d6dbefc_a9da_360c_a0bf_9a33e50ea722["OpenSslSessionStats.java"] c697bbe5_cfab_cde7_97a5_6adada18acbc -->|defined in| 3d6dbefc_a9da_360c_a0bf_9a33e50ea722 94c6fd69_e522_97ae_c0e8_7f55fb9a4c7e["OpenSslSessionStats()"] c697bbe5_cfab_cde7_97a5_6adada18acbc -->|method| 94c6fd69_e522_97ae_c0e8_7f55fb9a4c7e 5b5e0e80_a74c_c350_e11c_af88a511ee67["number()"] c697bbe5_cfab_cde7_97a5_6adada18acbc -->|method| 5b5e0e80_a74c_c350_e11c_af88a511ee67 4ce4bbfb_9ce8_de0f_ac11_2172cdd7cb63["connect()"] c697bbe5_cfab_cde7_97a5_6adada18acbc -->|method| 4ce4bbfb_9ce8_de0f_ac11_2172cdd7cb63 2ca80632_c687_a142_6835_e1be0ca6aec6["connectGood()"] c697bbe5_cfab_cde7_97a5_6adada18acbc -->|method| 2ca80632_c687_a142_6835_e1be0ca6aec6 6a99e202_9ab7_677d_4b25_3aa4ee59fccb["connectRenegotiate()"] c697bbe5_cfab_cde7_97a5_6adada18acbc -->|method| 6a99e202_9ab7_677d_4b25_3aa4ee59fccb 59ccab61_6797_a2bc_7fd5_693aea3593f7["accept()"] c697bbe5_cfab_cde7_97a5_6adada18acbc -->|method| 59ccab61_6797_a2bc_7fd5_693aea3593f7 f9f8a4c4_4d20_e12f_a566_b8248f38b5a0["acceptGood()"] c697bbe5_cfab_cde7_97a5_6adada18acbc -->|method| f9f8a4c4_4d20_e12f_a566_b8248f38b5a0 e6f82c2e_417a_3660_ca84_e6a6631b7611["acceptRenegotiate()"] c697bbe5_cfab_cde7_97a5_6adada18acbc -->|method| e6f82c2e_417a_3660_ca84_e6a6631b7611 d741247e_a9fd_2656_ae86_454f19d66ec0["hits()"] c697bbe5_cfab_cde7_97a5_6adada18acbc -->|method| d741247e_a9fd_2656_ae86_454f19d66ec0 812df8a0_c077_b862_0223_4ab961f4322e["cbHits()"] c697bbe5_cfab_cde7_97a5_6adada18acbc -->|method| 812df8a0_c077_b862_0223_4ab961f4322e ffe8257c_10fa_bd65_1d0d_b44f784a3a3e["misses()"] c697bbe5_cfab_cde7_97a5_6adada18acbc -->|method| ffe8257c_10fa_bd65_1d0d_b44f784a3a3e 62301e64_60ee_8292_c9f4_25dfc4c8fbb1["timeouts()"] c697bbe5_cfab_cde7_97a5_6adada18acbc -->|method| 62301e64_60ee_8292_c9f4_25dfc4c8fbb1 25a137af_6897_c3df_4989_49ffbdf57347["cacheFull()"] c697bbe5_cfab_cde7_97a5_6adada18acbc -->|method| 25a137af_6897_c3df_4989_49ffbdf57347
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/OpenSslSessionStats.java lines 28–253
public final class OpenSslSessionStats {
private final ReferenceCountedOpenSslContext context;
// IMPORTANT: We take the OpenSslContext and not just the long (which points the native instance) to prevent
// the GC to collect OpenSslContext as this would also free the pointer and so could result in a
// segfault when the user calls any of the methods here that try to pass the pointer down to the native
// level.
OpenSslSessionStats(ReferenceCountedOpenSslContext context) {
this.context = context;
}
/**
* Returns the current number of sessions in the internal session cache.
*/
public long number() {
Lock readerLock = context.ctxLock.readLock();
readerLock.lock();
try {
return SSLContext.sessionNumber(context.ctx);
} finally {
readerLock.unlock();
}
}
/**
* Returns the number of started SSL/TLS handshakes in client mode.
*/
public long connect() {
Lock readerLock = context.ctxLock.readLock();
readerLock.lock();
try {
return SSLContext.sessionConnect(context.ctx);
} finally {
readerLock.unlock();
}
}
/**
* Returns the number of successfully established SSL/TLS sessions in client mode.
*/
public long connectGood() {
Lock readerLock = context.ctxLock.readLock();
readerLock.lock();
try {
return SSLContext.sessionConnectGood(context.ctx);
} finally {
readerLock.unlock();
}
}
/**
* Returns the number of start renegotiations in client mode.
*/
public long connectRenegotiate() {
Lock readerLock = context.ctxLock.readLock();
readerLock.lock();
try {
return SSLContext.sessionConnectRenegotiate(context.ctx);
} finally {
readerLock.unlock();
}
}
/**
* Returns the number of started SSL/TLS handshakes in server mode.
*/
public long accept() {
Lock readerLock = context.ctxLock.readLock();
readerLock.lock();
try {
return SSLContext.sessionAccept(context.ctx);
} finally {
readerLock.unlock();
}
}
/**
* Returns the number of successfully established SSL/TLS sessions in server mode.
*/
public long acceptGood() {
Source
Frequently Asked Questions
What is the OpenSslSessionStats class?
OpenSslSessionStats is a class in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/OpenSslSessionStats.java.
Where is OpenSslSessionStats defined?
OpenSslSessionStats is defined in handler/src/main/java/io/netty/handler/ssl/OpenSslSessionStats.java at line 28.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free