Record Class PythonPoolStatistics

java.lang.Object
java.lang.Record
io.micronaut.context.python.PythonPoolStatistics
Record Components:
enabled - Whether pooling is enabled
targetSize - The number of pooled contexts the pool grows to
pooledContexts - The pooled contexts created so far
idleContexts - The pooled contexts waiting to be borrowed
eventLoopContexts - The contexts dedicated to Netty event loops
borrows - How many times a context was requested from the pool
waits - How many of those requests had to wait for a context
totalWaitMillis - The time all waiting requests spent waiting
maxWaitMillis - The longest single wait
closed - Whether the pool has been closed

@Introspected public record PythonPoolStatistics(boolean enabled, int targetSize, int pooledContexts, int idleContexts, int eventLoopContexts, long borrows, long waits, long totalWaitMillis, long maxWaitMillis, boolean closed) extends Record
A snapshot of the Python context pool.
Since:
5.2.0
  • Constructor Details

    • PythonPoolStatistics

      public PythonPoolStatistics(boolean enabled, int targetSize, int pooledContexts, int idleContexts, int eventLoopContexts, long borrows, long waits, long totalWaitMillis, long maxWaitMillis, boolean closed)
      Creates an instance of a PythonPoolStatistics record class.
      Parameters:
      enabled - the value for the enabled record component
      targetSize - the value for the targetSize record component
      pooledContexts - the value for the pooledContexts record component
      idleContexts - the value for the idleContexts record component
      eventLoopContexts - the value for the eventLoopContexts record component
      borrows - the value for the borrows record component
      waits - the value for the waits record component
      totalWaitMillis - the value for the totalWaitMillis record component
      maxWaitMillis - the value for the maxWaitMillis record component
      closed - the value for the closed record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • enabled

      public boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • targetSize

      public int targetSize()
      Returns the value of the targetSize record component.
      Returns:
      the value of the targetSize record component
    • pooledContexts

      public int pooledContexts()
      Returns the value of the pooledContexts record component.
      Returns:
      the value of the pooledContexts record component
    • idleContexts

      public int idleContexts()
      Returns the value of the idleContexts record component.
      Returns:
      the value of the idleContexts record component
    • eventLoopContexts

      public int eventLoopContexts()
      Returns the value of the eventLoopContexts record component.
      Returns:
      the value of the eventLoopContexts record component
    • borrows

      public long borrows()
      Returns the value of the borrows record component.
      Returns:
      the value of the borrows record component
    • waits

      public long waits()
      Returns the value of the waits record component.
      Returns:
      the value of the waits record component
    • totalWaitMillis

      public long totalWaitMillis()
      Returns the value of the totalWaitMillis record component.
      Returns:
      the value of the totalWaitMillis record component
    • maxWaitMillis

      public long maxWaitMillis()
      Returns the value of the maxWaitMillis record component.
      Returns:
      the value of the maxWaitMillis record component
    • closed

      public boolean closed()
      Returns the value of the closed record component.
      Returns:
      the value of the closed record component