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)  protected    (declared in ExpiringClassFactory)

 

constructor(serviceClass: Type; activator: IServiceActivator; enforceSessionCheck: Boolean)

 

PooledClassFactory(Type serviceClass, IServiceActivator activator, Boolean enforceSessionCheck)

 

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

Parameters:

  • serviceClass:
  • activator:
  • enforceSessionCheck:

constructor (Type, IServiceActivator, Boolean, Int32, Int32, PoolBehavior, Boolean)

 

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

 

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

 

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

Parameters:

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

AcquireInstance

Acquires a new Service instance that can be used to execute a remote service call, based on the logic of the class factory implementation.

 

method AcquireInstance(clientId: Guid): IROService

 

IROService AcquireInstance(Guid clientId)

 

Function AcquireInstance(clientId As Guid) As IROService

Parameters:

  • clientId:

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: