com.platform.ego.impl
Class ServiceContext

java.lang.Object
  extended by com.platform.ego.impl.ServiceContext

public class ServiceContext
extends java.lang.Object

ServiceContext specifies service context definition.

Version:
1.2.3

Constructor Summary
ServiceContext()
           
 
Method Summary
 ServiceAllocRequest getAllocRequest()
          Get request for allocation.
 java.lang.String getDescription()
          Get description of the service.
 ServiceInstanceDef[] getInstancesDef()
          Get definitions of service instance.
 int getMaxInstances()
          Get maximum number of service instances.
 int getMaxInstancesPerHost()
          Get maximum instances running on one host.
 int getMaxInstancesPerSlot()
          Get maximum instances running on one slot.
 int getMinInstances()
          Get minimum number of service instances.
 java.lang.String getName()
          Get name of service.
 ServicePolicy getPolicy()
          Get policy of service.
 int getPriority()
          Get order EGOSC starts services.
 boolean isNeedCredential()
          Get the flag that indicates whether the service needs a cluster administrator credential.
 void setAllocRequest(ServiceAllocRequest allocRequest)
          Set request for allocation.
 void setDescription(java.lang.String description)
          Set description of the service.
 void setInstancesDef(ServiceInstanceDef[] instancesDef)
          Set definitions of service instance.
 void setMaxInstances(int maxInstances)
          Set maximum number of service instances.
 void setMaxInstancesPerHost(int maxInstancesPerHost)
          Set maximum instances running on one host.
 void setMaxInstancesPerSlot(int maxInstancesPerSlot)
          Set maximum instances running on one slot.
 void setMinInstances(int minInstances)
          Set minimum number of service instances.
 void setName(java.lang.String name)
          Set name of service.
 void setNeedCredential(boolean needCredential)
          Set the flag that indicates whether the service needs a cluster administrator credential.
 void setPolicy(ServicePolicy policy)
          Set policy of service.
 void setPriority(int priority)
          Set order EGOSC starts services, the lager of the number is, the higher priority is.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceContext

public ServiceContext()
Method Detail

getAllocRequest

public ServiceAllocRequest getAllocRequest()
Get request for allocation.

Returns:
request for allocation.

setAllocRequest

public void setAllocRequest(ServiceAllocRequest allocRequest)
Set request for allocation.

Parameters:
allocRequest - : specifies request for allocation.

getDescription

public java.lang.String getDescription()
Get description of the service.

Returns:
description of the service.

setDescription

public void setDescription(java.lang.String description)
Set description of the service.

Parameters:
description - : specifies description of the service.

getInstancesDef

public ServiceInstanceDef[] getInstancesDef()
Get definitions of service instance.

Returns:
ID of allocation.

setInstancesDef

public void setInstancesDef(ServiceInstanceDef[] instancesDef)
Set definitions of service instance.

Parameters:
instancesDef - : specifies definitions of service instance.

getMaxInstances

public int getMaxInstances()
Get maximum number of service instances.

Returns:
maximum number of service instances.

setMaxInstances

public void setMaxInstances(int maxInstances)
Set maximum number of service instances.

Parameters:
maxInstances - : specifies maximum number of service instances.

getMaxInstancesPerHost

public int getMaxInstancesPerHost()
Get maximum instances running on one host.

Returns:
maximum instances running on one host.

setMaxInstancesPerHost

public void setMaxInstancesPerHost(int maxInstancesPerHost)
Set maximum instances running on one host.

Parameters:
maxInstancesPerHost - : specifies maximum instances running on one host.

getMaxInstancesPerSlot

public int getMaxInstancesPerSlot()
Get maximum instances running on one slot.

Returns:
maximum instances running on one slot.

setMaxInstancesPerSlot

public void setMaxInstancesPerSlot(int maxInstancesPerSlot)
Set maximum instances running on one slot.

Parameters:
maxInstancesPerSlot - : specifies maximum instances running on one slot.

getMinInstances

public int getMinInstances()
Get minimum number of service instances.

Returns:
minimum number of service instances.

setMinInstances

public void setMinInstances(int minInstances)
Set minimum number of service instances.

Parameters:
minInstances - : specifies minimum number of service instances.

getName

public java.lang.String getName()
Get name of service.

Returns:
name of service.

setName

public void setName(java.lang.String name)
Set name of service.

Parameters:
name - : specifies name of service.

isNeedCredential

public boolean isNeedCredential()
Get the flag that indicates whether the service needs a cluster administrator credential.

Returns:
true or false.

setNeedCredential

public void setNeedCredential(boolean needCredential)
Set the flag that indicates whether the service needs a cluster administrator credential.

Parameters:
needCredential - : specifies the flag.

getPolicy

public ServicePolicy getPolicy()
Get policy of service.

Returns:
policy of service.

setPolicy

public void setPolicy(ServicePolicy policy)
Set policy of service.

Parameters:
policy - : specifies policy of service.

getPriority

public int getPriority()
Get order EGOSC starts services.

Returns:
order EGOSC starts services.

setPriority

public void setPriority(int priority)
Set order EGOSC starts services, the lager of the number is, the higher priority is.

Parameters:
priority - : specifies order EGOSC starts services.


Copyright (C) 1992-2007 Platform Computing Corporation