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

Main Page   Class Hierarchy   Compound List   Compound Members  

SessionCreationAttributes Class Reference

Container for all attributes that may be required upon session creation. More...

List of all members.


Public Methods

 SessionCreationAttributes ()
 Default constructor.

virtual ~SessionCreationAttributes ()
 Destructor.

void setSessionName (const char *name) throw (SoamException)
 Sets the name of the session.

void setSessionName (const std::string &name) throw (SoamException)
 Sets the name of the session.

void setSessionType (const char *type) throw (SoamException)
 Sets the session type.

void setSessionType (const std::string &type) throw (SoamException)
 Sets the session type.

void setSessionFlags (const SoamUInt32 flags) throw (SoamException)
 Sets the session flags.

void setCommonData (Message *commonData) throw (SoamException)
 Sets the common data.

void setSessionCallback (SessionCallback *callback) throw (SoamException)
 Sets the session callback.

void setSessionTag (const char *tag) throw (SoamException)
 Sets the session tag.

void setSessionTag (const std::string &tag) throw (SoamException)
 Sets the session tag.

void setSessionPriority (const SoamInt32 priority) throw (SoamException)
 Sets the priority of the session.

void setServiceName (const char *serviceName) throw (SoamException)
 Sets the service name to be associated with the session.

void setServiceName (const std::string &serviceName) throw (SoamException)
 Sets the service name to be associated with the session.

void enableDataCompression (bool compressionEnable) throw (SoamException)
 Enables or disables data compression for a session.

void setDataCompressionThreshold (const SoamInt32 threshold) throw (SoamException)
 Sets the threshold for triggering data compression.

void setDataCompressionFlags (const SoamUInt32 dataCompressionFlag) throw (SoamException)
 Sets any flag associated with data compression.

void enableDirectDataTransfer (bool directDataTransferEnable) throw (SoamException)
 Enables or disables the Direct Data Transfer feature for a session.

void setDirectDataTransferFlags (SoamInt32 ddtFlags) throw (SoamException)
 Sets the Direct Data Transfer flags.

void setPreemptive (bool preemptive) throw (SoamException)
 Specifies whether the session preempts sessions with lower priority when it has workload to run.

void setServiceToSlotRatio (const ServiceToSlotRatio &ratio) throw (SoamException)
 Applies a slot usage requirement to this session by specifying a service to slot ratio.

void setResourceGroupFilter (const char *filter) throw (SoamException)
 Applies a resource group filter to this session.

void setResourceGroupFilter (const std::string &filter) throw (SoamException)
 Applies a resource group filter to this session.

void setPreemptionRank (const SoamInt32 preemptionRank) throw (SoamException)
 Sets the preemptionRank of the session.

void setDefaultResourceAttributeValue (const SoamDouble defaultResourceAttributeValue) throw (SoamException)
 Sets the default value of resource attribute for the session.

void setResourcePreference (const ResourcePreference &preference) throw (SoamException)
 Sets the resource preference object of the session.

void addDefinition (ResourceAttributeDefinition &definition) throw (SoamException)
 Add resource attribute definition to resource preference object of the session.


Friends

class Connection

Detailed Description

Container for all attributes that may be required upon session creation.

See also:
Connection::createSession(const SessionCreationAttributes& attributes)


Constructor & Destructor Documentation

SessionCreationAttributes  
 

Default constructor.

Constructs a SessionCreationAttributes object with default settings.

virtual ~SessionCreationAttributes   [virtual]
 

Destructor.


Member Function Documentation

void setSessionName const char *    name throw (SoamException)
 

Sets the name of the session.

The session name attribute tells Symphony what name to give your session, so that the session can be easily identified. Maximum 256 characters. Default session name is "".

Parameters:
name  [IN] - The session name.
Exceptions:
SoamException 

void setSessionName const std::string &    name throw (SoamException)
 

Sets the name of the session.

The session name attribute tells Symphony what name to give your session, so that the session can be easily identified. Maximum 256 characters. Default session name is "".

Parameters:
name  [IN] - The session name.
Exceptions:
SoamException 

void setSessionType const char *    type throw (SoamException)
 

Sets the session type.

The session type argument tells Symphony which type of session to create. In the application profile, you can define different types of sessions with different attributes. Symphony also defines a system default session type with the name "". For this argument, specify the name of the session type you would like to use. Default value is "".

Parameters:
type  [IN] - The session type.
Exceptions:
SoamException 

void setSessionType const std::string &    type throw (SoamException)
 

Sets the session type.

The session type argument tells Symphony which type of session to create. In the application profile, you can define different types of sessions with different attributes. Symphony also defines a system default session type with the name "". For this argument, specify the name of the session type you would like to use. Default value is "".

Parameters:
type  [IN] - The session type.
Exceptions:
SoamException 

void setSessionFlags const SoamUInt32    flags throw (SoamException)
 

Sets the session flags.

The session flags are used to inform the API of any extended behavior to associate with the session. When not specified, the default flag will be SF_SYNC. This value can be a combination of Session::SessionFlags values. See samples for details.

Parameters:
flags  [IN] - The session flags.
Exceptions:
SoamException 
See also:
Session::SessionFlags

void setCommonData Message   commonData throw (SoamException)
 

Sets the common data.

This method allows you to provide common data to the created session. Common data is any data that is common to all of the tasks in your session. You can send common data rather than sending duplicate data to each task, and thus save on network overhead. Default value is null - no common data.

Parameters:
commonData  [IN] - The common data for the session.
Exceptions:
SoamException 

void setSessionCallback SessionCallback   callback throw (SoamException)
 

Sets the session callback.

This method allows you to specify a SessionCallback object, which is a handler that will allow you to process your session's task results asynchronously. The session callback should only be provided when you have set the appropriate session flags to indicate that you will be receiving task results asynchronously. Default value is null - no session callback.

Parameters:
callback  [IN] - The session callback.
Exceptions:
SoamException 

void setSessionTag const char *    tag throw (SoamException)
 

Sets the session tag.

The session tag is just a string that will be associated with the created session. Maximum length 128 characters. Default value is "", which means that no session tag is associated with the session.

Parameters:
tag  [IN] - The session tag.
Exceptions:
SoamException 

void setSessionTag const std::string &    tag throw (SoamException)
 

Sets the session tag.

The session tag is just a string that will be associated with the created session. Maximum length 128 characters. Default value is "", which means that no session tag is associated with the session.

Parameters:
tag  [IN] - The session tag.
Exceptions:
SoamException 

void setSessionPriority const SoamInt32    priority throw (SoamException)
 

Sets the priority of the session.

Depending on the scheduling policy in effect for an application, a session's priority may impact the assignment of service instances to a session, whenever the Session Manager attempts to make scheduling decisions. The higher the priority the greater the likelihood that a service instance will be assigned to this session (if one is available).

Note: The session priority can be any number between 1 and 10,000 (inclusive).

Parameters:
priority  [IN] - The priority of the session.
Exceptions:
SoamException 

void setServiceName const char *    serviceName throw (SoamException)
 

Sets the service name to be associated with the session.

This methods allows the developer to dynamically associate a service name with the session being created. You can define multiple Service sections in your application profile, where each service may be different. Setting the service name on your session means that this session will be serviced by the specified service section.

Note: The service name can only be one of the names defined in the application profile.

Parameters:
serviceName  [IN] - The service name.
Exceptions:
SoamException 

void setServiceName const std::string &    serviceName throw (SoamException)
 

Sets the service name to be associated with the session.

This methods allows the developer to dynamically associate a service name with the session being created. You can define multiple Service sections in your application profile, where each service may be different. Setting the service name on your session means that this session will be serviced by the specified service section.

Note: The service name can only be one of the names defined in the application profile.

Parameters:
serviceName  [IN] - The service name.
Exceptions:
SoamException 

void enableDataCompression bool    compressionEnable throw (SoamException)
 

Enables or disables data compression for a session.

Data compression will be triggered once the serialized data size is larger than the Data Compression Threshold. The default Data Compression Threshold is 1KB. Data compression can be enabled or disabled while creating the session and cannot be changed once the session has been created. When not explicitly specified, data compression will be disabled.

Note: Once enabled, all data compression attributes will be applied to common data, common data updates, task input and task output.

Parameters:
compressionEnable  [IN] - Enable or disable data compression.
Exceptions:
SoamException 

void setDataCompressionThreshold const SoamInt32    threshold throw (SoamException)
 

Sets the threshold for triggering data compression.

When data compression is enabled for a session, the Data Compression Threshold will be the amount of serialized data (in kilobytes) to allow before triggering compression.The default value for this threshold is 1 kilobyte.

Note: Sets this value has no effect if data compression is disabled.

Parameters:
threshold  [IN] - The data compression threshold.
Exceptions:
SoamException 

void setDataCompressionFlags const SoamUInt32    dataCompressionFlag throw (SoamException)
 

Sets any flag associated with data compression.

When data compression is enabled for a session, compression flags can be used to modify the behavior of the data compression feature.

The default value for this flag is Session::DataCompressionFlags.BestSpeed.

Note: Sets this value has no effect if data compression is disabled.

Parameters:
dataCompressionFlag  [IN] - Compression flags.
Exceptions:
SoamException 
See also:
Session::DataCompressionFlags

void enableDirectDataTransfer bool    directDataTransferEnable throw (SoamException)
 

Enables or disables the Direct Data Transfer feature for a session.

Direct Data Transfer will provide a way to directly send the data from the client to the service transparently to the client application or vice versa. This attribute may be set during session creation operations. If this attribute is not set by the application it means Direct Data Transfer will not be enabled.

Note: Once enabled, all Direct Data Transfer attributes will be applied to common data, common data updates, task input and task output.

Parameters:
directDataTransferEnable  [IN] - Flag that specifies whether to enable the Direct Data Transfer feature.
Exceptions:
SoamException 

void setDirectDataTransferFlags SoamInt32    ddtFlags throw (SoamException)
 

Sets the Direct Data Transfer flags.

When Direct Data Transfer is enabled for a session, Direct Data Transfer flags can be used to modify the behavior of the Direct Data Transfer feature.

Note: Setting this value has no effect if Direct Data Transfer is disabled.

See also:
Session::DirectDataTransferFlags for details of the possible flags.
Parameters:
ddtFlags  [IN] - Direct Data Transfer Flags
Exceptions:
SoamException 

void setPreemptive bool    preemptive throw (SoamException)
 

Specifies whether the session preempts sessions with lower priority when it has workload to run.

If set to true, the session with higher priority preempts sessions with lower priority to get resources and finish the session as soon as possible.

Parameters:
preemptive  [IN] - Specifies whether the session preempts others.
Exceptions:
SoamException 

void setServiceToSlotRatio const ServiceToSlotRatio   ratio throw (SoamException)
 

Applies a slot usage requirement to this session by specifying a service to slot ratio.

This service to slot ratio overrides the one defined for the SessionType in the application profile. Tasks from this session can only run on service instances that occupy the appropriate number of slots. The ratio specified 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. Default value is 1:1.

Parameters:
ratio  [IN] - The number of service to slot ratio to apply to this session.
Exceptions:
SoamException 

void setResourceGroupFilter const char *    filter throw (SoamException)
 

Applies a resource group filter to this session.

This resource group filter overrides the one defined for the SessionType in the application profile. Tasks from a session can only run on resources that belong to one of the resource groups listed in the filter. Default value is "", meaning that no filter is specified; the application-level resource group will take effect.

Parameters:
filter  [IN] - The resource group filter to apply to this session.
Exceptions:
SoamException 

void setResourceGroupFilter const std::string &    filter throw (SoamException)
 

Applies a resource group filter to this session.

This resource group filter overrides the one defined for the SessionType in the application profile. Tasks from a session can only run on resources that belong to one of the resource groups listed in the filter. Default value is "", meaning that no filter is specified; the application-level resource group will take effect.

Parameters:
filter  [IN] - The resource group filter to apply to this session.
Exceptions:
SoamException 

void setPreemptionRank const SoamInt32    preemptionRank throw (SoamException)
 

Sets the preemptionRank of the session.

A session's preemptionRank will impact the reclaim behavior among sessions. The session with lower preemptionRank is more desirable to be reclaimed.

Note: The session preemptionRank can be any number between 1 and 10,000 (inclusive).

Parameters:
preemptionRank  [IN] - The reclaim rank of the session.
Exceptions:
SoamException 

void setDefaultResourceAttributeValue const SoamDouble    defaultResourceAttributeValue throw (SoamException)
 

Sets the default value of resource attribute for the session.

A session's default value of resource attribute will impact the resource schedule behavior among sessions.

Note: The value range is -1.000001e+300 to 1.000001e+300

Parameters:
defaultResourceAttributeValue  [IN] - The default value of the resource attribute for the session.
Exceptions:
SoamException 

void setResourcePreference const ResourcePreference   preference throw (SoamException)
 

Sets the resource preference object of the session.

Parameters:
preference  [IN] - The resource preference of the session.
Exceptions:
SoamException 

void addDefinition ResourceAttributeDefinition   definition throw (SoamException)
 

Add resource attribute definition to resource preference object of the session.

Parameters:
definition  [IN] - The resource attribute definition for resource preference of the session.
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.