vortex.channelpool
— LuaVortexChannelPool class: channel pools¶API documentation for vortex.ChannelPool object representing a set of channels that are reused across the session.
vortex.
ChannelPool
¶next_ready
(channelpool[, auto_inc][, user_data])¶Allows to get a ready channel from the pool. If auto_inc is set to true, the pool creates a new channel in case there is no ready channel at this time.
Parameters: |
|
---|---|
Return type: | a reference to vortex.Channel or nil if it fails. nil can be returned if auto_inc is not defined or set to false and no ready channel is available. |
release
(channelpool, channel)¶Allows to release the give channel into the pool, making it available for future next_ready calls.
Parameters: |
|
---|
check
(channelpool)¶Allows to check if the provided reference is a vortex.channelpool.
Parameters: | channelpool (vortex.channelpool) – The channel pool where to get a channel. |
---|---|
Return type: | true if the object represents a vortex.channelpool, otherwise false is returned. |
id
¶(Read only attribute) (Integer) returns the channel pool unique identifier. This identifier is unique in context of the connection.
ctx
¶(Read only attribute) (vortex.ctx) returns the context where the vortex.ChannelPool was created.
conn
¶(Read only attribute) (vortex.connection) returns the connection where this channel pool is running.
channel_count
¶(Read only attribute) (Integer) returns the number of channels that are handled by the channel pool.
channel_available
¶(Read only attribute) (Integer) returns the number of channels available (that are ready to be returned by calling to next_ready ())