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

CBufferHandleAllocator Class Reference

Inheritance diagram for CBufferHandleAllocator:
Collaboration diagram for CBufferHandleAllocator:

List of all members.

Public Types

typedef unsigned long BufferCount

Public Member Functions

 CBufferHandleAllocator (BufferCount maxFreeBuffers, JetByteTools::IO::IAllocateBuffers &bufferAllocator, bool log=true)
 CBufferHandleAllocator (const CBufferHandleAllocator &rhs)
 ~CBufferHandleAllocator () override
CBufferHandleAllocatoroperator= (const CBufferHandleAllocator &rhs)
BufferCount EnlargePool (BufferCount buffersToAdd)
 Add buffersToAdd buffer handles to the pool.
CBufferHandle * AllocateHandle () override
 Allocate a CBufferHandle, remember to call Release() on it when you're done with it.
IBuffer::BufferSize GetBufferSize () const override
CSmartBuffer Allocate () override
 Allocate an instance of IBuffer, remember to call Release() on it when you're done with it.
CSmartBuffer Allocate (const IBuffer &buffer) override
 Allocate a CBufferHandle and attach the supplied IBuffer to it, return the CBufferHandle's IBuffer interface, remember to call Release() on it when you're done with it.
CSmartBuffer AllocateCustomSizedBuffer (IBuffer::BufferSize bufferSize) override
bool Flush () override
 Flushes the allocator. Use with care as this forces active buffer handles to be released and destroyed! Generally only called as part of process cleanup and even then only to aid in buffer leak tracking.


Member Typedef Documentation

typedef unsigned long BufferCount [inherited]


Constructor & Destructor Documentation

CBufferHandleAllocator ( BufferCount  maxFreeBuffers,
JetByteTools::IO::IAllocateBuffers bufferAllocator,
bool  log = true 
)

~CBufferHandleAllocator (  )  [override]

Reimplemented from CBufferHandleAllocator.


Member Function Documentation

CBufferHandleAllocator& operator= ( const CBufferHandleAllocator rhs  ) 

CBufferHandleAllocator::BufferCount EnlargePool ( BufferCount  buffersToAdd  )  [inherited]

Add buffersToAdd buffer handles to the pool.

CBufferHandle * AllocateHandle (  )  [override, virtual, inherited]

Allocate a CBufferHandle, remember to call Release() on it when you're done with it.

Implements IAllocateBufferHandles.

IBuffer::BufferSize GetBufferSize (  )  const [override, virtual, inherited]

CSmartBuffer Allocate (  )  [override, virtual, inherited]

Allocate an instance of IBuffer, remember to call Release() on it when you're done with it.

Implements IManageBufferLifeCycle.

CSmartBuffer Allocate ( const IBuffer &  buffer  )  [override, virtual, inherited]

Allocate a CBufferHandle and attach the supplied IBuffer to it, return the CBufferHandle's IBuffer interface, remember to call Release() on it when you're done with it.

Implements IAllocateBufferHandles.

CSmartBuffer AllocateCustomSizedBuffer ( IBuffer::BufferSize  bufferSize  )  [override, virtual, inherited]

bool Flush (  )  [override, virtual, inherited]

Flushes the allocator. Use with care as this forces active buffer handles to be released and destroyed! Generally only called as part of process cleanup and even then only to aid in buffer leak tracking.

Implements IAllocateBufferHandles.


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