ObjectPoolT ClassIpswitch.Messaging.Framework
ObjectPool manages objects whose instantiation and initialization costs prohibit constant allocation/deallocation. ObjectPool recycles old objects and dynamically increases and decreases the number of allocated objects as demand requires.
Inheritance Hierarchy

SystemObject
  IMailAPI_NETObjectPoolT

Namespace: IMailAPI_NET
Assembly: IMailAPI_NET (in IMailAPI_NET.dll) Version: 1.0.0.0
Syntax

public class ObjectPool<T> : IEnumerable
where T : new()

Type Parameters

T
Any type with the new() constraint.

The ObjectPoolT type exposes the following members.

Constructors

  NameDescription
Public methodObjectPoolT
ObjectPool constructor.
Top
Methods

  NameDescription
Public methodAcquire
Get a new pool item. The pool will keep a count of this item, so it needs to be given back to the pool with Release().
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodForget
In the event that items pulled from the queue are no longer useable, and should not be repooled, Forget forces ItemsAllocated to stop keeping track of those items, allowing more items to be created, if necessary. You must call this if you choose not to Release an item back to the pool.
Public methodGetEnumerator
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRelease
Releases the specified pool item, putting it back into the pool of available items for recycling.
Public methodShutdown
Prepares the pool for shutdown, and calls Release on each pool item. Does not account for extant items in use.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Fields

  NameDescription
Public fieldShuttingDown
Top
Properties

  NameDescription
Public propertyCount
Public propertyItemLifeSpanMinutes
Public propertyItemsAllocated
Public propertyMaxItems
Public propertyMinItems
Top
See Also

Reference