|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openspaces.pu.sla.SLA
public class SLA
A set of definitions controlling the nature of a processing unit deployment on the Service Grid.
The SLA allows to control a clustered deployment which maps to
ClusterInfo
. The
clusterSchema
, numberOfInstances
,
and numberOfBackups
control the cluster
topology. Note that it is up to the user to defined the correct values
according to the chosen cluster schema. For example, when using partitioned
schema, the number of backups should not be set (or set to 0).
The SLA is translated into one or more service bean definitions, each can have one or more instances. When having one or more backups, a service bean definition will be created for each primary and its backups group. So, in case of 2 instances with 1 backup, two service bean definition will be created, one for the first instance and its backup, and the second for the second instance and its backup.
Max instances per VM can also be set which using setMaxInstancesPerVM(int)
.
It controls how many instances of a specific deployment will be created within a
grid container. This is very beneficial when using primary with backup where we would
not want the primary to run in the same VM as the backup.
A list of monitor
s
can be added to the SLA. The monitors can be used to monitor different runtime aspects
of the processing unit. They can then be used to affect certain Policy
that is set.
A list of Requirement
s
can also be added to the SLA. The requirements control if a certain processing unit instance will be
deployed to a grid container. It will only be deployed if the grid container meets the specified
requirements.
A Policy
can be set on the SLA to control
the actions the grid container should take in case the policy associated monitor value breach the
policy thresholds.
Constructor Summary | |
---|---|
SLA()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
String |
getClusterSchema()
Returns the cluster schema the processing unit will use. |
List<InstanceSLA> |
getInstanceSLAs()
|
int |
getMaxInstancesPerMachine()
Returns the maximum number of instances of the processing unit allowed to run on the same machine, regardless of the number of grid containers running on it. |
int |
getMaxInstancesPerVM()
Returns the maximum number of instances of the processing unit allowed to run within the same grid container. |
Map<String,Integer> |
getMaxInstancesPerZone()
|
MemberAliveIndicator |
getMemberAliveIndicator()
|
List<Monitor> |
getMonitors()
Returns a list of monitors can be used to monitor different runtime aspects of the processing unit. |
int |
getNumberOfBackups()
Returns the number of backups that each primary instance will have in a cluster. |
int |
getNumberOfInstances()
Returns the number of primary instances that are running within the cluster. |
Policy |
getPolicy()
Returns the policy associated with the SLA controlling the runtime policy on the action needed to be taken when the monitor associated with the policy breaks the policy thresholds. |
String |
getPrimaryZone()
|
List<Requirement> |
getRequirements()
Returns a list of requirements that control if a certain processing unit instance will be deployed to a grid container. |
void |
setClusterSchema(String clusterSchema)
Sets the cluster schema the processing unit will use. |
void |
setInstanceSLAs(List<InstanceSLA> instanceSLAs)
|
void |
setMaxInstancesPerMachine(int maxInstancesPerMachine)
Sets the maximum number of instances of the processing unit allowed to run on the same machine, regardless of the number of grid containers running on it. |
void |
setMaxInstancesPerVM(int maxInstancesPerVM)
Sets the maximum number of instances of the processing unit allowed to run within the same grid container. |
void |
setMaxInstancesPerZone(Map<String,Integer> maxInstancesPerZone)
|
void |
setMaxInstancesPerZoneAsString(String maxInstancesPerZone)
|
void |
setMemberAliveIndicator(MemberAliveIndicator memberAliveIndicator)
|
void |
setMonitors(List<Monitor> monitors)
Sets a list of monitors can be used to monitor different runtime aspects of the processing unit. |
void |
setNumberOfBackups(int numberOfBackups)
Sets the number of backups that each primary instance will have in a cluster. |
void |
setNumberOfInstances(int numberOfInstances)
Sets the number of primary instances that are running within the cluster. |
void |
setPolicy(Policy policy)
Sets the policy associated with the SLA controlling the runtime policy on the action needed to be taken when the monitor associated with the policy breaks the policy thresholds. |
void |
setPrimaryZone(String primaryZone)
|
void |
setRequirements(List<Requirement> requirements)
Sets a list of requirements that control if a certain processing unit instance will be deployed to a grid container. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SLA()
Method Detail |
---|
public String getClusterSchema()
null
value which means that it was not set.
ClusterInfo.getSchema()
public void setClusterSchema(String clusterSchema)
null
value which means that it was not set.
ClusterInfo.setSchema(String)
public int getNumberOfInstances()
numberOfBackups
. Defaults to 1
.
ClusterInfo.getNumberOfInstances()
public void setNumberOfInstances(int numberOfInstances)
numberOfBackups
. . Defaults to 1
.
public int getNumberOfBackups()
0
value which means that it was not set and should not be taken into
account. Defaults to 0
.
public void setNumberOfBackups(int numberOfBackups)
0
value which means that it was not set and should not be taken into
account. Defaults to 0
.
public int getMaxInstancesPerVM()
Note, when using number of backups higher than 0, this value only applies to a primary with its backups group.
public void setMaxInstancesPerVM(int maxInstancesPerVM)
Note, when using number of backups higher than 0, this value only applies to a primary with its backups group.
public int getMaxInstancesPerMachine()
Note, when using number of backups higher than 0, this value only applies to a primary with its backups group.
public void setMaxInstancesPerMachine(int maxInstancesPerMachine)
Note, when using number of backups higher than 0, this value only applies to a primary with its backups group.
public Map<String,Integer> getMaxInstancesPerZone()
public void setMaxInstancesPerZone(Map<String,Integer> maxInstancesPerZone)
public void setMaxInstancesPerZoneAsString(String maxInstancesPerZone)
public Policy getPolicy()
public void setPolicy(Policy policy)
public List<Requirement> getRequirements()
public void setRequirements(List<Requirement> requirements)
public String getPrimaryZone()
public void setPrimaryZone(String primaryZone)
public List<Monitor> getMonitors()
Policy
that is set.
public void setMonitors(List<Monitor> monitors)
Policy
that is set.
public List<InstanceSLA> getInstanceSLAs()
public void setInstanceSLAs(List<InstanceSLA> instanceSLAs)
public MemberAliveIndicator getMemberAliveIndicator()
public void setMemberAliveIndicator(MemberAliveIndicator memberAliveIndicator)
public String toString()
toString
in class Object
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |