server.connection_pool

Attributes

pond

factory

Classes

ClientFactory

ClientContextManager

Module Contents

class server.connection_pool.ClientFactory(pooled_maxsize: int = 8, least_one: bool = False)

Bases: pond.PooledObjectFactory

createInstance() pond.PooledObject

Create a new pooled object.

Returns:

PooledObject: The new pooled object.

destroy(pooled_object: pond.PooledObject) None

Destroy the pooled object.

Args:

pooled_object (PooledObject): The pooled object to be destroyed.

reset(pooled_object: pond.PooledObject) pond.PooledObject

Reset the pooled object to the initial state.

Args:

pooled_object (PooledObject): The pooled object to be reset. **kwargs (Any): The arguments to be used to reset the pooled object.

Returns:

PooledObject: The reset pooled object.

validate(pooled_object: pond.PooledObject) bool

Validate the pooled object.

Args:

pooled_object (PooledObject): The pooled object to be reset.

Returns:

bool: True if the pooled object is valid, otherwise False. If the pooled object is not valid, it will be destroyed.

server.connection_pool.pond
server.connection_pool.factory
class server.connection_pool.ClientContextManager
__enter__() nntp.NNTPClient
__exit__(exc_type, exc_val, exc_tb) None