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

Platform Symphony 5.0 Java API Reference

com.platform.symphony.soam
Class ServiceToSlotRatio

java.lang.Object
  extended by com.platform.symphony.soam.ServiceToSlotRatio

public class ServiceToSlotRatio
extends java.lang.Object

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(com.platform.symphony.soam.ServiceToSlotRatio), ServiceContext.getServiceToSlotRatio()

Constructor Summary
ServiceToSlotRatio(int numServices, int numSlots)
          Constructs a ServiceToSlotRatio object.
 
Method Summary
 int getNumberOfServices()
          Gets the number of services portion (the numerator) of the ServiceToSlotRatio.
 int getNumberOfSlots()
          Gets the number of slots portion (the denominator) of the ServiceToSlotRatio.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceToSlotRatio

public ServiceToSlotRatio(int numServices,
                          int numSlots)
Constructs a ServiceToSlotRatio object.

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

getNumberOfServices

public int getNumberOfServices()
                        throws 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.
Throws:
SoamException

getNumberOfSlots

public int getNumberOfSlots()
                     throws SoamException
Gets the number of slots portion (the denominator) of the ServiceToSlotRatio.

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

Version 5.0
Date Modified: -DREL_DATE=Nov 11 2009
Platform Computing. Accelerating Intelligence(TM).
Copyright (C) 2001-2009 Platform Computing Corporation. All rights reserved.