FixedSizeBuffer Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Manages a contiguous block of memory. Calls purge action with itself as the purge request when it's signaled to purge.
public class FixedSizeBuffer : Orleans.Providers.Streams.Common.PooledResource<Orleans.Providers.Streams.Common.FixedSizeBuffer>
type FixedSizeBuffer = class
inherit PooledResource<FixedSizeBuffer>
Public Class FixedSizeBuffer
Inherits PooledResource(Of FixedSizeBuffer)
- Inheritance
Constructors
FixedSizeBuffer(Int32) |
Manages access to a fixed size byte buffer. |
Fields
SizeInByte |
Buffer size in bytes. |
Properties
Id |
Unique identifier of this buffer. |
Pool |
Gets the pool to return this resource to upon disposal. A pool must set this property upon resource allocation. (Inherited from PooledResource<T>) |
Methods
Dispose() |
Returns item to pool. (Inherited from PooledResource<T>) |
OnResetState() |
Notifies the object that it has been purged, so it can reset itself to the state of a newly allocated object. |
SignalPurge() |
If this object is to be used in a fixed size object pool, this call should be overridden with the purge implementation that returns the object to the pool. (Inherited from PooledResource<T>) |
TryGetSegment(Int32, ArraySegment<Byte>) |
Try to get a segment with a buffer of the specified size from this block. Fail if there is not enough space available |