Public Member Functions | |
virtual bool | CanCreateConnection ()=0 |
Called to determine if a connection can be created. If this returns true then it's assumed that a connection will be created and that when the connection is no longer operational that ReleaseConnection() will be called. | |
void | ReleaseConnection () override=0 |
Called when a connection, that was created after CanCreateConnection() has returned true, is no longer operational. | |
virtual LONG | GetOverallLimit () const =0 |
Returns the maximum number of connections possible; note that this is NOT the current number of connections possible, it's the TOTAL number possible. | |
Static Public Attributes | |
static JETBYTE_CONSTEXPR LONG | NoLimit = 0 |
Used to specify that the connection limiter has no limit to the number of connections that can be created. | |
Protected Member Functions | |
~ILimitConnections () override | |
We never delete instances of this interface; you must manage the lifetime of the class that implements it. | |
Classes | |
class | Creator |
A class that takes ownership of an attempt at connection creation. That is if you call CanCreateConnection() through it and then do not call ConnectionCreated() then the destructor will assume something went awry and call ReleaseConnection(). This class can therefore be used to support scope based connection creation. More... |
~ILimitConnections | ( | ) | [override, protected] |
We never delete instances of this interface; you must manage the lifetime of the class that implements it.
virtual bool CanCreateConnection | ( | ) | [pure virtual] |
Called to determine if a connection can be created. If this returns true then it's assumed that a connection will be created and that when the connection is no longer operational that ReleaseConnection() will be called.
Implemented in CConnectionLimiter.
void ReleaseConnection | ( | ) | [override, pure virtual] |
Called when a connection, that was created after CanCreateConnection() has returned true, is no longer operational.
Implements IReleaseCreatedConnections.
Implemented in CConnectionLimiter.
virtual LONG GetOverallLimit | ( | ) | const [pure virtual] |
Returns the maximum number of connections possible; note that this is NOT the current number of connections possible, it's the TOTAL number possible.
Implemented in CConnectionLimiter.
Used to specify that the connection limiter has no limit to the number of connections that can be created.