Record Class PythonPoolStatistics
java.lang.Object
java.lang.Record
io.micronaut.context.python.PythonPoolStatistics
- Record Components:
enabled- Whether pooling is enabledtargetSize- The number of pooled contexts the pool grows topooledContexts- The pooled contexts created so faridleContexts- The pooled contexts waiting to be borrowedeventLoopContexts- The contexts dedicated to Netty event loopsborrows- How many times a context was requested from the poolwaits- How many of those requests had to wait for a contexttotalWaitMillis- The time all waiting requests spent waitingmaxWaitMillis- The longest single waitclosed- 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 Summary
ConstructorsConstructorDescriptionPythonPoolStatistics(boolean enabled, int targetSize, int pooledContexts, int idleContexts, int eventLoopContexts, long borrows, long waits, long totalWaitMillis, long maxWaitMillis, boolean closed) Creates an instance of aPythonPoolStatisticsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongborrows()Returns the value of theborrowsrecord component.booleanclosed()Returns the value of theclosedrecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of theeventLoopContextsrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theidleContextsrecord component.longReturns the value of themaxWaitMillisrecord component.intReturns the value of thepooledContextsrecord component.intReturns the value of thetargetSizerecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalWaitMillisrecord component.longwaits()Returns the value of thewaitsrecord component.
-
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 aPythonPoolStatisticsrecord class.- Parameters:
enabled- the value for theenabledrecord componenttargetSize- the value for thetargetSizerecord componentpooledContexts- the value for thepooledContextsrecord componentidleContexts- the value for theidleContextsrecord componenteventLoopContexts- the value for theeventLoopContextsrecord componentborrows- the value for theborrowsrecord componentwaits- the value for thewaitsrecord componenttotalWaitMillis- the value for thetotalWaitMillisrecord componentmaxWaitMillis- the value for themaxWaitMillisrecord componentclosed- the value for theclosedrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
enabled
-
targetSize
public int targetSize()Returns the value of thetargetSizerecord component.- Returns:
- the value of the
targetSizerecord component
-
pooledContexts
public int pooledContexts()Returns the value of thepooledContextsrecord component.- Returns:
- the value of the
pooledContextsrecord component
-
idleContexts
public int idleContexts()Returns the value of theidleContextsrecord component.- Returns:
- the value of the
idleContextsrecord component
-
eventLoopContexts
public int eventLoopContexts()Returns the value of theeventLoopContextsrecord component.- Returns:
- the value of the
eventLoopContextsrecord component
-
borrows
-
waits
-
totalWaitMillis
public long totalWaitMillis()Returns the value of thetotalWaitMillisrecord component.- Returns:
- the value of the
totalWaitMillisrecord component
-
maxWaitMillis
public long maxWaitMillis()Returns the value of themaxWaitMillisrecord component.- Returns:
- the value of the
maxWaitMillisrecord component
-
closed
-