# Class OpenSSLSessionStats

java.lang.Object
org.apache.tomcat.util.net.openssl.OpenSSLSessionStats

public final class OpenSSLSessionStats extends Object
Stats exposed by an OpenSSL session context.

See Also:
  - `SSL_CTX_sess_number`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `accept()`
  Returns the number of started SSL/TLS handshakes in server mode.
  `long`
  `acceptGood()`
  Returns the number of successfully established SSL/TLS sessions in server mode.
  `long`
  `acceptRenegotiate()`
  Returns the number of start renegotiations in server mode.
  `long`
  `cacheFull()`
  Returns the number of sessions that were removed because the maximum session cache size was exceeded.
  `long`
  `cbHits()`
  Returns the number of successfully retrieved sessions from the external session cache in server mode.
  `long`
  `connect()`
  Returns the number of started SSL/TLS handshakes in client mode.
  `long`
  `connectGood()`
  Returns the number of successfully established SSL/TLS sessions in client mode.
  `long`
  `connectRenegotiate()`
  Returns the number of start renegotiations in client mode.
  `long`
  `hits()`
  Returns the number of successfully reused sessions.
  `long`
  `misses()`
  Returns the number of sessions proposed by clients that were not found in the internal session cache in server mode.
  `long`
  `number()`
  Returns the current number of sessions in the internal session cache.
  `long`
  `timeouts()`
  Returns the number of sessions proposed by clients and either found in the internal or external session cache in server mode, but that were invalid due to timeout.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### number

    public long number()
    Returns the current number of sessions in the internal session cache.
    Returns:
      The current number of sessions

  - ### connect

    public long connect()
    Returns the number of started SSL/TLS handshakes in client mode.
    Returns:
      The number of started handshakes

  - ### connectGood

    public long connectGood()
    Returns the number of successfully established SSL/TLS sessions in client mode.
    Returns:
      The number of successful connections

  - ### connectRenegotiate

    public long connectRenegotiate()
    Returns the number of start renegotiations in client mode.
    Returns:
      The number of renegotiations

  - ### accept

    public long accept()
    Returns the number of started SSL/TLS handshakes in server mode.
    Returns:
      The number of started handshakes

  - ### acceptGood

    public long acceptGood()
    Returns the number of successfully established SSL/TLS sessions in server mode.
    Returns:
      The number of successful accepts

  - ### acceptRenegotiate

    public long acceptRenegotiate()
    Returns the number of start renegotiations in server mode.
    Returns:
      The number of renegotiations

  - ### hits

    public long hits()
    Returns the number of successfully reused sessions. In client mode, a session set with `SSL_set_session` successfully reused is counted as a hit. In server mode, a session successfully retrieved from internal or external cache is counted as a hit.
    Returns:
      The number of session hits

  - ### cbHits

    public long cbHits()
    Returns the number of successfully retrieved sessions from the external session cache in server mode.
    Returns:
      The number of callback hits

  - ### misses

    public long misses()
    Returns the number of sessions proposed by clients that were not found in the internal session cache in server mode.
    Returns:
      The number of session misses

  - ### timeouts

    public long timeouts()
    Returns the number of sessions proposed by clients and either found in the internal or external session cache in server mode, but that were invalid due to timeout. These sessions are not included in the `hits()` count.
    Returns:
      The number of session timeouts

  - ### cacheFull

    public long cacheFull()
    Returns the number of sessions that were removed because the maximum session cache size was exceeded.
    Returns:
      The number of cache full evictions