The C++ framework for developing highly scalable, high performance servers on Windows platforms.

ILimitPendingWrites Class Reference
[InterfacesAsynchronous I/OProtected destructors on abstract base classes]

Inheritance diagram for ILimitPendingWrites:
Collaboration diagram for ILimitPendingWrites:

List of all members.


Detailed Description

An interface to an object that manages the number of writes currently in progress and that can disallow any more write requests being made. Call CanWrite() when you wish to issue a new write request and when it returns you can issue your write and call WriteComplete() when the write is complete.

Public Member Functions

virtual bool TryIssueWrite ()=0
 Called to determine if a write can be issued. Returns true if the write can be issued and false if not. If it returns true then you MUST call WriteCompleted() when the write completes.
virtual void IssueWrite ()=0
 Called when a write is issued. Blocks until a write can be issued. You MUST call WriteCompleted() when the write completes.
virtual void WriteCompleted ()=0
 Called when a write has completed or failed if that write was issued after TryIssueWrite() has returned true, or after IssueWrite() has been called.
virtual LONG GetOverallLimit () const =0
 Returns the maximum number of pending writes possible; note that this is NOT the current number of writes possible, it's the TOTAL number possible.

Static Public Attributes

static
JETBYTE_CONSTEXPR
LONG 
NoLimit = 0
 Used to specify that the write limiter has no limit to the number of connections that can be created.

Protected Member Functions

virtual ~ILimitPendingWrites ()
 We never delete instances of this interface; you must manage the lifetime of the class that implements it.

Constructor & Destructor Documentation

virtual ~ILimitPendingWrites (  )  [protected, virtual]

We never delete instances of this interface; you must manage the lifetime of the class that implements it.


Member Function Documentation

virtual bool TryIssueWrite (  )  [pure virtual]

Called to determine if a write can be issued. Returns true if the write can be issued and false if not. If it returns true then you MUST call WriteCompleted() when the write completes.

Implemented in CPendingWriteLimiter.

virtual void IssueWrite (  )  [pure virtual]

Called when a write is issued. Blocks until a write can be issued. You MUST call WriteCompleted() when the write completes.

Implemented in CPendingWriteLimiter.

virtual void WriteCompleted (  )  [pure virtual]

Called when a write has completed or failed if that write was issued after TryIssueWrite() has returned true, or after IssueWrite() has been called.

Implemented in CPendingWriteLimiter.

virtual LONG GetOverallLimit (  )  const [pure virtual]

Returns the maximum number of pending writes possible; note that this is NOT the current number of writes possible, it's the TOTAL number possible.

Implemented in CPendingWriteLimiter.


Member Data Documentation

JETBYTE_CONSTEXPR LONG NoLimit = 0 [static]

Used to specify that the write limiter has no limit to the number of connections that can be created.


Generated on Sun Sep 12 19:09:29 2021 for The Server Framework - v7.4 by doxygen 1.5.3