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

IMonitorBufferAllocation Class Reference
[InterfacesMonitoringI/O BuffersProtected destructors on abstract base classes]

Inheritance diagram for IMonitorBufferAllocation:

List of all members.


Detailed Description

An interface to allow a class to monitor the operation of a class that allocates buffers. The interface assumes that buffers go through the following life-cycle: created, allocated, released, destroyed. Allocators that pool buffers can allow a buffer to be created once and then allocated and released several times before being deleted. Incrementing a counter when OnBufferCreated() is called and decrementing it when OnBufferDestroyed() is called will give you a count of the number of buffers that are in existence at any one time. A corresponding counter that is incremented in OnBufferAllocated() and decremented when OnBufferReleased() is called will give a count of the buffers that are currently in use.

Public Member Functions

virtual void OnBufferCreated ()=0
 Called when a buffer is created; a buffer can be created only once.
virtual void OnCustomSizedBufferCreated ()
 Called when a buffer larger than poolable size is created; a buffer can be created only once.
virtual void OnBufferAllocated (JetByteTools::Core::IIndexedOpaqueUserData &userData)=0
 Called when a buffer is allocated, that is when a user requests a buffer and is given one. A buffer can be allocated multiple times, if, for example, the allocator pools buffers for reuse. Before a given buffer can be allocated again it must have been released.
virtual void OnBufferAllocatedFromPool (JetByteTools::Core::IIndexedOpaqueUserData &userData)
virtual void OnCustomSizedBufferAllocated (JetByteTools::Core::IIndexedOpaqueUserData &userData)
virtual void OnBufferAllocationContention ()=0
 Called when a buffer allocator encounters lock contention during allocation.
virtual void OnBufferReleaseContention ()=0
 Called when a buffer allocator encounters lock contention during release.
virtual void OnBufferReleased (JetByteTools::Core::IIndexedOpaqueUserData &userData)=0
 Called when a buffer is released, that is when a user no longer requires it and it returns to the allocator. A buffer should be released as many times as it is allocated.
virtual void OnBufferReleasedToPool (JetByteTools::Core::IIndexedOpaqueUserData &userData)
virtual void OnCustomSizedBufferReleased (JetByteTools::Core::IIndexedOpaqueUserData &userData)
virtual void OnBufferDestroyed ()=0
 Called when a buffer is destroyed; a buffer can be destroyed only once.
virtual void OnCustomSizedBufferDestroyed ()

Protected Member Functions

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

Constructor & Destructor Documentation

virtual ~IMonitorBufferAllocation (  )  [protected, virtual]

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


Member Function Documentation

virtual void OnBufferCreated (  )  [pure virtual]

Called when a buffer is created; a buffer can be created only once.

Implemented in CNullBufferAllocationMonitor.

virtual void OnCustomSizedBufferCreated (  )  [inline, virtual]

Called when a buffer larger than poolable size is created; a buffer can be created only once.

Reimplemented in CNullBufferAllocationMonitor.

virtual void OnBufferAllocated ( JetByteTools::Core::IIndexedOpaqueUserData userData  )  [pure virtual]

Called when a buffer is allocated, that is when a user requests a buffer and is given one. A buffer can be allocated multiple times, if, for example, the allocator pools buffers for reuse. Before a given buffer can be allocated again it must have been released.

Implemented in CNullBufferAllocationMonitor.

virtual void OnBufferAllocatedFromPool ( JetByteTools::Core::IIndexedOpaqueUserData userData  )  [inline, virtual]

Reimplemented in CNullBufferAllocationMonitor.

virtual void OnCustomSizedBufferAllocated ( JetByteTools::Core::IIndexedOpaqueUserData userData  )  [inline, virtual]

Reimplemented in CNullBufferAllocationMonitor.

virtual void OnBufferAllocationContention (  )  [pure virtual]

Called when a buffer allocator encounters lock contention during allocation.

Implemented in CNullBufferAllocationMonitor.

virtual void OnBufferReleaseContention (  )  [pure virtual]

Called when a buffer allocator encounters lock contention during release.

Implemented in CNullBufferAllocationMonitor.

virtual void OnBufferReleased ( JetByteTools::Core::IIndexedOpaqueUserData userData  )  [pure virtual]

Called when a buffer is released, that is when a user no longer requires it and it returns to the allocator. A buffer should be released as many times as it is allocated.

Implemented in CNullBufferAllocationMonitor.

virtual void OnBufferReleasedToPool ( JetByteTools::Core::IIndexedOpaqueUserData userData  )  [inline, virtual]

Reimplemented in CNullBufferAllocationMonitor.

virtual void OnCustomSizedBufferReleased ( JetByteTools::Core::IIndexedOpaqueUserData userData  )  [inline, virtual]

Reimplemented in CNullBufferAllocationMonitor.

virtual void OnBufferDestroyed (  )  [pure virtual]

Called when a buffer is destroyed; a buffer can be destroyed only once.

Implemented in CNullBufferAllocationMonitor.

virtual void OnCustomSizedBufferDestroyed (  )  [inline, virtual]

Reimplemented in CNullBufferAllocationMonitor.


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