PooledClassFactory

Overview

This class factory maintains a pool of service implementations that will be used to service incoming requests.

Use the individual options for the class factory to control how and when instances will be allocated and freed, and how the class factory behaves if more concurrent requests are received than can be served by the pool.

Location

Instance Methods


constructor (Type, IServiceActivator, Boolean, array of String)  protected    (declared in ExpiringClassFactory)

 

constructor(serviceClass: Type; activator: IServiceActivator; enforceSessionCheck: Boolean; roles: array of String)

 

PooledClassFactory(Type serviceClass, IServiceActivator activator, Boolean enforceSessionCheck, String[] roles)

 

Sub New(serviceClass As Type, activator As IServiceActivator, enforceSessionCheck As Boolean, roles As String())

Parameters:

  • serviceClass:
  • activator:
  • enforceSessionCheck:
  • roles:

constructor (Type, IServiceActivator, Boolean, array of String, Int32, Int32, PoolBehavior, Boolean)

 

constructor(serviceClass: Type; activator: IServiceActivator; enforceSessionCheck: Boolean; roles: array of String; timeout: Int32; poolSize: Int32; poolBehavior: PoolBehavior; initializePool: Boolean)

 

PooledClassFactory(Type serviceClass, IServiceActivator activator, Boolean enforceSessionCheck, String[] roles, Int32 timeout, Int32 poolSize, PoolBehavior poolBehavior, Boolean initializePool)

 

Sub New(serviceClass As Type, activator As IServiceActivator, enforceSessionCheck As Boolean, roles As String(), timeout As Int32, poolSize As Int32, poolBehavior As PoolBehavior, initializePool As Boolean)

Parameters:

  • serviceClass:
  • activator:
  • enforceSessionCheck:
  • roles:
  • timeout:
  • poolSize:
  • poolBehavior:
  • initializePool:

AcquireInstance

 

method AcquireInstance(clientId: Guid; activate: Boolean): IROService

 

IROService AcquireInstance(Guid clientId, Boolean activate)

 

Function AcquireInstance(clientId As Guid, activate As Boolean) As IROService

Parameters:

  • clientId:
  • activate:

ActivateInstance  protected    (declared in ClassFactory)

 

method ActivateInstance(clientId: Guid; instance: IROService)

 

void ActivateInstance(Guid clientId, IROService instance)

 

Sub ActivateInstance(clientId As Guid, instance As IROService)

Parameters:

  • clientId:
  • instance:

ClearPool

Destroys all objects in the pool and forces new instances to be created when the next requests come in. Instances that are active at the time ClearPool is called will be removed from the pool and discarded after they get released.

 

method ClearPool

 

void ClearPool()

 

Sub ClearPool()

CreateInstance    (declared in ClassFactory)

 

method CreateInstance: IROService

 

IROService CreateInstance()

 

Function CreateInstance() As IROService

DeactivateInstance  protected    (declared in ClassFactory)

 

method DeactivateInstance(clientId: Guid; instance: IROService)

 

void DeactivateInstance(Guid clientId, IROService instance)

 

Sub DeactivateInstance(clientId As Guid, instance As IROService)

Parameters:

  • clientId:
  • instance:

Dispose    (declared in ExpiringClassFactory)

Stops and disposes the internal timer.

 

method Dispose

 

void Dispose()

 

Sub Dispose()

DisposeManagedResources  protected

 

method DisposeManagedResources

 

void DisposeManagedResources()

 

Sub DisposeManagedResources()

DisposeNativeResources  protected    (declared in ExpiringClassFactory)

 

method DisposeNativeResources

 

void DisposeNativeResources()

 

Sub DisposeNativeResources()

ExpireInstances  protected

 

method ExpireInstances

 

void ExpireInstances()

 

Sub ExpireInstances()

Finalize  protected    (declared in ExpiringClassFactory)

 

method Finalize

 

void Finalize()

 

Sub Finalize()

ReleaseInstance

Releases a previously acquired Service instance, based on the logic of the class factory implementation.

 

method ReleaseInstance(clientId: Guid; instance: IROService)

 

void ReleaseInstance(Guid clientId, IROService instance)

 

Sub ReleaseInstance(clientId As Guid, instance As IROService)

Parameters:

  • clientId:
  • instance:

ResizePool

 

method ResizePool(newSize: Int32)

 

void ResizePool(Int32 newSize)

 

Sub ResizePool(newSize As Int32)

Parameters:

  • newSize: