Visit Platform at http://www.platform.com

Main Page   Class Hierarchy   Compound List   Compound Members  

ServiceToSlotRatio Class Reference

A service to slot ratio, which describes how many slots a service instance consumes. More...

List of all members.


Public Methods

 ServiceToSlotRatio (const SoamUInt32 numServices, const SoamUInt32 numSlots)
 Constructs a ServiceToSlotRatio object.

SoamUInt32 getNumberOfServices () const throw (SoamException)
 Gets the number of services portion (the numerator) of the ServiceToSlotRatio.

SoamUInt32 getNumberOfSlots () const throw (SoamException)
 Gets the number of slots portion (the denominator) of the ServiceToSlotRatio.


Detailed Description

A service to slot ratio, which describes how many slots a service instance consumes.

The ratio must be either 1:N or N:1, where N is a positive integer. For N:1, the maximum value of N is 10. A 1:N ratio means that 1 service instance runs on multiple slots. An N:1 ratio means that multiple service instances run on 1 slot.

When specified to create a session, this ratio indicates how many slots a service instance requires in order to run tasks from this session. The ratio will be validated when the SessionCreationAttributes::setServiceToSlotRatio(...) method is applied.

See also:
SessionCreationAttributes::setServiceToSlotRatio , ServiceContext::getServiceToSlotRatio


Constructor & Destructor Documentation

ServiceToSlotRatio const SoamUInt32    numServices,
const SoamUInt32    numSlots
 

Constructs a ServiceToSlotRatio object.

Parameters:
numServices  [IN] - The number of service instances that are capable of running on 'numSlots' slots.
numSlots  [IN] - The number of slots required to run 'numServices' service instances.

Member Function Documentation

SoamUInt32 getNumberOfServices   const throw (SoamException)
 

Gets the number of services portion (the numerator) of the ServiceToSlotRatio.

Returns:
The number of service instances that are capable of running on 'numSlots' slots.
Exceptions:
SoamException 

SoamUInt32 getNumberOfSlots   const throw (SoamException)
 

Gets the number of slots portion (the denominator) of the ServiceToSlotRatio.

Returns:
The number of slots required to run 'numServices' service instances.
Exceptions:
SoamException 


     
Date Modified: 11 Nov 2009
Platform Support: support@platform.com
Platform Information Development: doc@platform.com

Platform Computing. Accelerating Intelligence(TM).
Copyright © 2001-2009 Platform Computing Corporation. All rights reserved.