public class DefaultGridServiceManager extends AbstractAgentGridComponent implements InternalGridServiceManager
admin
Constructor and Description |
---|
DefaultGridServiceManager(ServiceID serviceID,
com.gigaspaces.grid.gsm.GSM gsm,
InternalAdmin admin,
int agentId,
String agentUid,
JVMDetails jvmDetails) |
Modifier and Type | Method and Description |
---|---|
void |
decrementInstance(ProcessingUnitInstance processingUnitInstance) |
boolean |
decrementPlannedInstances(ProcessingUnit processingUnit)
Decrements a planned instance if the number of planned instances is less then the actual
instances to maintain.
|
boolean |
deleteResource(String resourceName) |
Application |
deploy(ApplicationConfig applicationConfig)
Deploys an application consisting of one or more processing unit deployments.
|
Application |
deploy(ApplicationConfig applicationConfig,
long timeout,
TimeUnit timeUnit)
Deploys an application consisting of one or more processing unit deployments.
|
Application |
deploy(ApplicationDeployment deployment)
Deploys an application consisting of one or more processing unit deployments.
|
Application |
deploy(ApplicationDeployment applicationDeployment,
long timeout,
TimeUnit timeUnit)
Deploys an application consisting of one or more processing unit deployments.
|
ProcessingUnit |
deploy(Application application,
ProcessingUnitDeploymentTopology deploymentTopology,
long timeout,
TimeUnit timeUnit) |
ProcessingUnit |
deploy(ElasticSpaceDeployment deployment)
Deploys an elastic space based on the space deployment information on the given grid service
manager (it will act as the primary GSM for the deployed processing unit).
|
ProcessingUnit |
deploy(ElasticSpaceDeployment deployment,
long timeout,
TimeUnit timeUnit)
Deploys an elastic space based on the space deployment information on the given grid service
manager (it will act as the primary GSM for the deployed processing unit).
|
ProcessingUnit |
deploy(ElasticStatefulProcessingUnitDeployment deployment)
Deploys an elastic processing unit that has an embedded space based on the processing unit
deployment information on the given grid service manager (it will act as the primary GSM for
the deployed processing unit).
|
ProcessingUnit |
deploy(ElasticStatefulProcessingUnitDeployment deployment,
long timeout,
TimeUnit timeUnit)
Deploys an elastic processing unit that has an embedded space based on the processing unit
deployment information on the given grid service manager (it will act as the primary GSM for
the deployed processing unit).
|
ProcessingUnit |
deploy(ElasticStatelessProcessingUnitDeployment deployment)
Deploys an elastic processing unit that does not have an embedded space based on the
processing unit deployment information on the given grid service manager (it will act as the
primary GSM for the deployed processing unit).
|
ProcessingUnit |
deploy(ElasticStatelessProcessingUnitDeployment deployment,
long timeout,
TimeUnit timeUnit)
Deploys an elastic processing unit that does not have an embedded space based on the
processing unit deployment information on the given grid service manager (it will act as the
primary GSM for the deployed processing unit).
|
ProcessingUnit |
deploy(MemcachedDeployment deployment)
Deploys a memcached based on the space deployment information on the given grid service
manager (it will act as the primary GSM for the deployed processing unit).
|
ProcessingUnit |
deploy(MemcachedDeployment deployment,
long timeout,
TimeUnit timeUnit)
Deploys a memcached based on the space deployment information on the given grid service
manager (it will act as the primary GSM for the deployed processing unit).
|
ProcessingUnit |
deploy(ProcessingUnitConfigHolder puConfigHolder)
Deploys a new processing unit based on the specified configuration
|
ProcessingUnit |
deploy(ProcessingUnitConfigHolder puConfigHolder,
long timeout,
TimeUnit timeUnit)
Deploys a new processing unit based on the specified configuration
|
ProcessingUnit |
deploy(ProcessingUnitDeployment deployment)
Deploys a processing unit based on the processing unit deployment information on the given
grid service manager (it will act as the primary GSM for the deployed processing unit).
|
ProcessingUnit |
deploy(ProcessingUnitDeployment deployment,
long timeout,
TimeUnit timeUnit)
Deploys a processing unit based on the processing unit deployment information on the given
grid service manager (it will act as the primary GSM for the deployed processing unit).
|
ProcessingUnit |
deploy(SpaceDeployment deployment)
Deploys a space based on the space deployment information on the given grid service manager
(it will act as the primary GSM for the deployed processing unit).
|
ProcessingUnit |
deploy(SpaceDeployment deployment,
long timeout,
TimeUnit timeUnit)
Deploys a space based on the space deployment information on the given grid service manager
(it will act as the primary GSM for the deployed processing unit).
|
void |
destroyInstance(ProcessingUnitInstance processingUnitInstance) |
void |
disableLRMIMonitoring() |
void |
enableLRMIMonitoring() |
boolean |
equals(Object o) |
LRMIMonitoringDetails |
fetchLRMIMonitoringDetails() |
DumpResult |
generateDump(String cause,
Map<String,Object> context)
Generates dump for all the provided dump processors.
|
DumpResult |
generateDump(String cause,
Map<String,Object> context,
String... processors)
Generates dump for the provided processors.
|
String |
getCodeBaseURL() |
long |
getCurrentTimeInMillis() |
ServiceGridAdminDriver |
getDriver() |
org.jini.rio.monitor.event.Events |
getEvents(int maxEvents) |
com.gigaspaces.grid.gsm.GSM |
getGSM() |
JVMStatistics |
getJVMStatistics() |
NIODetails |
getNIODetails() |
NIOStatistics |
getNIOStatistics() |
OSDetails |
getOSDetails() |
OSStatistics |
getOSStatistics() |
ScaleStrategyConfig |
getProcessingUnitScaleStrategyConfig(ProcessingUnit pu) |
ServiceID |
getServiceID() |
String |
getUid()
Returns the unique id of the grid component.
|
int |
hashCode() |
void |
incrementInstance(ProcessingUnit processingUnit) |
boolean |
isActiveManager() |
boolean |
isDeployed(String processingUnitName)
Determine if this deployment is known to this GSM.
|
boolean |
isManagedByElasticServiceManager(ProcessingUnit pu) |
boolean |
isManagedByElasticServiceManagerAndScaleNotInProgress(ProcessingUnit pu) |
String[] |
listDeployDir() |
LogEntries |
logEntries(LogEntryMatcher matcher)
Returns the log entries matching the given matcher for the specific grid component.
|
LogEntries |
logEntriesDirect(LogEntryMatcher matcher)
Same as
LogProviderGridComponent.logEntries(com.gigaspaces.log.LogEntryMatcher) , but does not try and get the
logs from the agent. |
void |
reloadMetricConfiguration() |
void |
relocate(ProcessingUnitInstance processingUnitInstance,
GridServiceContainer gridServiceContainer) |
void |
runGc() |
void |
setProcessingUnitElasticProperties(ProcessingUnit pu,
Map<String,String> properties) |
void |
setProcessingUnitScaleStrategyConfig(ProcessingUnit pu,
ScaleStrategyConfig scaleStrategyConfig) |
static org.jini.rio.core.OperationalString |
toOperationalString(Deploy deploy,
ProcessingUnitConfig puConfig,
String applicationName,
String[] groups,
LookupLocator[] locators,
com.gigaspaces.grid.gsm.GSM gsm) |
static org.jini.rio.core.OperationalString |
toOperationalString(Properties props,
Properties contextProperties)
Invoked via reflection from GSCImpl
|
void |
undeploy(String processingUnitName)
Undeploys the processing unit based on its name.
|
void |
updateProcessingUnitElasticPropertiesOnGsm(ProcessingUnit pu,
Map<String,String> elasticProperties)
Used as a call back by the esm to update the store of records of elastic properties on the
actual gsm
|
getAgentId, getAgentUid, getGridServiceAgent, kill, restart, setGridServiceAgent
addZone, assertStateChangesPermitted, getAdmin, getJVMDetails, getMachine, getOperatingSystem, getTransport, getVirtualMachine, getZones, isDiscovered, setDiscovered, setMachine, setOperatingSystem, setTransport, setVirtualMachine
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getAgentUid, setGridServiceAgent
getAgentId, getGridServiceAgent, kill, restart
getAdmin
setDiscovered
isDiscovered
setMachine
getMachine
setTransport
getTransport
setOperatingSystem
getOperatingSystem
getJVMDetails
setVirtualMachine
getVirtualMachine
addZone
public DefaultGridServiceManager(ServiceID serviceID, com.gigaspaces.grid.gsm.GSM gsm, InternalAdmin admin, int agentId, String agentUid, JVMDetails jvmDetails) throws RemoteException
RemoteException
public ServiceGridAdminDriver getDriver()
getDriver
in interface InternalGridServiceManager
public String getUid()
GridComponent
getUid
in interface GridComponent
getUid
in interface InternalVirtualMachineInfoProvider
public ServiceID getServiceID()
getServiceID
in interface InternalGridServiceManager
public com.gigaspaces.grid.gsm.GSM getGSM()
getGSM
in interface InternalGridServiceManager
public ProcessingUnit deploy(SpaceDeployment deployment)
GridServiceManager
The deployment process will wait indefinitely and return the actual processing unit that can be used.
Note, deploying just a space is simply deploying a built in processing unit that starts just an embedded space.
deploy
in interface GridServiceManager
public ProcessingUnit deploy(SpaceDeployment deployment, long timeout, TimeUnit timeUnit)
GridServiceManager
The deployment process will wait for the given timeout and return the actual processing unit that can be used.
Note, deploying just a space is simply deploying a built in processing unit that starts just an embedded space.
deploy
in interface GridServiceManager
public ProcessingUnit deploy(ProcessingUnitDeployment deployment)
GridServiceManager
The deployment process will wait indefinitely and return the actual processing unit that can be used.
deploy
in interface GridServiceManager
public ProcessingUnit deploy(MemcachedDeployment deployment)
GridServiceManager
The deployment process will wait indefinitely and return the actual processing unit that can be used.
Note, deploying just a memcached is simply deploying a built in processing unit that starts / connects to a space (holding the memcached entries) and exposing the memcached protocol.
deploy
in interface GridServiceManager
public ProcessingUnit deploy(MemcachedDeployment deployment, long timeout, TimeUnit timeUnit)
GridServiceManager
The deployment process will wait for the given timeout and return the actual processing unit that can be used.
Note, deploying just a memcached is simply deploying a built in processing unit that starts / connects to a space (holding the memcached entries) and exposing the memcached protocol.
deploy
in interface GridServiceManager
public ProcessingUnit deploy(ProcessingUnitDeployment deployment, long timeout, TimeUnit timeUnit)
GridServiceManager
The deployment process will wait for the given timeout and return the actual processing unit that can be used.
deploy
in interface GridServiceManager
public ProcessingUnit deploy(ProcessingUnitConfigHolder puConfigHolder)
GridServiceManager
deploy
in interface GridServiceManager
public ProcessingUnit deploy(ProcessingUnitConfigHolder puConfigHolder, long timeout, TimeUnit timeUnit)
GridServiceManager
The deployment process will wait for the given timeout and return the actual processing unit that can be used.
deploy
in interface GridServiceManager
public static org.jini.rio.core.OperationalString toOperationalString(Properties props, Properties contextProperties) throws Exception
Exception
public static org.jini.rio.core.OperationalString toOperationalString(Deploy deploy, ProcessingUnitConfig puConfig, String applicationName, String[] groups, LookupLocator[] locators, com.gigaspaces.grid.gsm.GSM gsm) throws Exception
Exception
public void undeploy(String processingUnitName)
GridServiceManager
// wait for the lookup event of the processing unit by name. ProcessingUnit pu =
admin.getProcessingUnits().waitFor("mypuname");
// wait for the lookup event of the grid service manager that manages the processing unit.
pu.waitForManaged();
// undeploy the processing unit. pu.undeploy();
undeploy
in interface GridServiceManager
public void destroyInstance(ProcessingUnitInstance processingUnitInstance)
destroyInstance
in interface InternalGridServiceManager
public boolean decrementPlannedInstances(ProcessingUnit processingUnit)
InternalGridServiceManager
decrementPlannedInstances
in interface InternalGridServiceManager
true
if a planned instance was successfully decremented;
false
planned instances hasn't changed.public void decrementInstance(ProcessingUnitInstance processingUnitInstance)
decrementInstance
in interface InternalGridServiceManager
public void incrementInstance(ProcessingUnit processingUnit)
incrementInstance
in interface InternalGridServiceManager
public void relocate(ProcessingUnitInstance processingUnitInstance, GridServiceContainer gridServiceContainer)
relocate
in interface InternalGridServiceManager
processingUnitInstance
- The processing unit instance to relocategridServiceContainer
- The GSC to relocate to, or null
if the GSM should
decide on a suitable GSC to relocate to.public LogEntries logEntries(LogEntryMatcher matcher) throws AdminException
LogProviderGridComponent
GridServiceAgent
, will get the log through it
instead of creating a load on the actual grid component.logEntries
in interface LogProviderGridComponent
AdminException
public LogEntries logEntriesDirect(LogEntryMatcher matcher) throws AdminException
LogProviderGridComponent
LogProviderGridComponent.logEntries(com.gigaspaces.log.LogEntryMatcher)
, but does not try and get the
logs from the agent.logEntriesDirect
in interface LogProviderGridComponent
AdminException
public void reloadMetricConfiguration() throws AdminException
reloadMetricConfiguration
in interface MetricProvider
AdminException
public DumpResult generateDump(String cause, Map<String,Object> context) throws AdminException
DumpProvider
generateDump
in interface DumpProvider
cause
- The cause that this dump was generatedcontext
- Allows to provide specific parameters to specific processorsAdminException
public DumpResult generateDump(String cause, Map<String,Object> context, String... processors) throws AdminException
DumpProvider
generateDump
in interface DumpProvider
cause
- The cause this dump was generated.context
- Allows to provide specific parameters to specific processors.processors
- The list of processors to be used.AdminException
public NIODetails getNIODetails() throws RemoteException
getNIODetails
in interface InternalTransportInfoProvider
RemoteException
public NIOStatistics getNIOStatistics() throws RemoteException
getNIOStatistics
in interface InternalTransportInfoProvider
RemoteException
public void enableLRMIMonitoring() throws RemoteException
enableLRMIMonitoring
in interface InternalTransportInfoProvider
RemoteException
public void disableLRMIMonitoring() throws RemoteException
disableLRMIMonitoring
in interface InternalTransportInfoProvider
RemoteException
public LRMIMonitoringDetails fetchLRMIMonitoringDetails() throws RemoteException
fetchLRMIMonitoringDetails
in interface InternalTransportInfoProvider
RemoteException
public long getCurrentTimeInMillis() throws RemoteException
getCurrentTimeInMillis
in interface InternalOperatingSystemInfoProvider
RemoteException
public OSDetails getOSDetails() throws RemoteException
getOSDetails
in interface InternalOperatingSystemInfoProvider
RemoteException
public OSStatistics getOSStatistics() throws RemoteException
getOSStatistics
in interface InternalOperatingSystemInfoProvider
RemoteException
public JVMStatistics getJVMStatistics() throws RemoteException
getJVMStatistics
in interface InternalVirtualMachineInfoProvider
RemoteException
public void runGc() throws RemoteException
runGc
in interface InternalVirtualMachineInfoProvider
RemoteException
public String[] listDeployDir()
listDeployDir
in interface InternalGridServiceManager
public boolean isDeployed(String processingUnitName)
GridServiceManager
isDeployed
in interface GridServiceManager
processingUnitName
- the name of the deployed processing unit.true
if this deployment is known; false
otherwise.public ProcessingUnit deploy(ElasticSpaceDeployment deployment) throws ProcessingUnitAlreadyDeployedException
GridServiceManager
The deployment process will wait indefinitely and return the actual processing unit that can be used.
Note, deploying just a space is simply deploying a built in processing unit that starts just an embedded space.
deploy
in interface GridServiceManager
ProcessingUnitAlreadyDeployedException
public ProcessingUnit deploy(ElasticSpaceDeployment deployment, long timeout, TimeUnit timeUnit) throws ProcessingUnitAlreadyDeployedException
GridServiceManager
The deployment process will wait for the given timeout and return the actual processing unit that can be used.
Note, deploying just a space is simply deploying a built in processing unit that starts just an embedded space.
deploy
in interface GridServiceManager
ProcessingUnitAlreadyDeployedException
public ProcessingUnit deploy(ElasticStatefulProcessingUnitDeployment deployment) throws ProcessingUnitAlreadyDeployedException
GridServiceManager
The deployment process will wait indefinitely and return the actual processing unit that can be used.
deploy
in interface GridServiceManager
ProcessingUnitAlreadyDeployedException
- - processing unit with the same name has
already been deployed.public ProcessingUnit deploy(ElasticStatefulProcessingUnitDeployment deployment, long timeout, TimeUnit timeUnit) throws ProcessingUnitAlreadyDeployedException
GridServiceManager
The deployment process will wait for the given timeout and return the actual processing unit that can be used.
deploy
in interface GridServiceManager
ProcessingUnitAlreadyDeployedException
- - processing unit with the same name has
already been deployed.public ProcessingUnit deploy(ElasticStatelessProcessingUnitDeployment deployment) throws ProcessingUnitAlreadyDeployedException
GridServiceManager
The deployment process will wait indefinitely and return the actual processing unit that can be used.
deploy
in interface GridServiceManager
ProcessingUnitAlreadyDeployedException
- - processing unit with the same name has
already been deployed.public ProcessingUnit deploy(ElasticStatelessProcessingUnitDeployment deployment, long timeout, TimeUnit timeUnit) throws ProcessingUnitAlreadyDeployedException
GridServiceManager
The deployment process will wait for the given timeout and return the actual processing unit that can be used.
deploy
in interface GridServiceManager
ProcessingUnitAlreadyDeployedException
- - processing unit with the same name has
already been deployed.public void setProcessingUnitElasticProperties(ProcessingUnit pu, Map<String,String> properties)
setProcessingUnitElasticProperties
in interface InternalGridServiceManager
public void setProcessingUnitScaleStrategyConfig(ProcessingUnit pu, ScaleStrategyConfig scaleStrategyConfig)
setProcessingUnitScaleStrategyConfig
in interface InternalGridServiceManager
public void updateProcessingUnitElasticPropertiesOnGsm(ProcessingUnit pu, Map<String,String> elasticProperties)
InternalGridServiceManager
updateProcessingUnitElasticPropertiesOnGsm
in interface InternalGridServiceManager
public ScaleStrategyConfig getProcessingUnitScaleStrategyConfig(ProcessingUnit pu)
getProcessingUnitScaleStrategyConfig
in interface InternalGridServiceManager
public boolean isManagedByElasticServiceManager(ProcessingUnit pu)
isManagedByElasticServiceManager
in interface InternalGridServiceManager
public boolean isManagedByElasticServiceManagerAndScaleNotInProgress(ProcessingUnit pu)
isManagedByElasticServiceManagerAndScaleNotInProgress
in interface InternalGridServiceManager
public Application deploy(ApplicationDeployment deployment) throws ApplicationAlreadyDeployedException, ProcessingUnitAlreadyDeployedException
GridServiceManager
The deployment process will wait indefinitely
deploy
in interface GridServiceManager
ApplicationAlreadyDeployedException
- - Application with the same name has already
been deployed.ProcessingUnitAlreadyDeployedException
- - Processing unit with the same name has
already been deployed. Processing Unit names
are globally unique (regardless of the
application name)public Application deploy(ApplicationConfig applicationConfig) throws ApplicationAlreadyDeployedException, ProcessingUnitAlreadyDeployedException
GridServiceManager
The deployment process will wait indefinitely
deploy
in interface GridServiceManager
ApplicationAlreadyDeployedException
- - Application with the same name has already
been deployed.ProcessingUnitAlreadyDeployedException
- - Processing unit with the same name has
already been deployed. Processing Unit names
are globally unique (regardless of the
application name)public Application deploy(ApplicationDeployment applicationDeployment, long timeout, TimeUnit timeUnit) throws ApplicationAlreadyDeployedException, ProcessingUnitAlreadyDeployedException
GridServiceManager
The deployment process will wait for the given timeout
deploy
in interface GridServiceManager
ApplicationAlreadyDeployedException
- - Application with the same name has already
been deployed.ProcessingUnitAlreadyDeployedException
- - Processing unit with the same name has
already been deployed. Processing Unit names
are globally unique (regardless of the
application name)public Application deploy(ApplicationConfig applicationConfig, long timeout, TimeUnit timeUnit) throws ApplicationAlreadyDeployedException, ProcessingUnitAlreadyDeployedException
GridServiceManager
The deployment process will wait for the given timeout
deploy
in interface GridServiceManager
ApplicationAlreadyDeployedException
- - Application with the same name has already
been deployed.ProcessingUnitAlreadyDeployedException
- - Processing unit with the same name has
already been deployed. Processing Unit names
are globally unique (regardless of the
application name)public boolean isActiveManager()
isActiveManager
in interface GridServiceManager
true
if managing at least one deployment ; false
otherwisepublic boolean deleteResource(String resourceName)
deleteResource
in interface GridServiceManager
true
if successfully deleted the resource folder from the deploy folder ;
false
otherwisepublic ProcessingUnit deploy(Application application, ProcessingUnitDeploymentTopology deploymentTopology, long timeout, TimeUnit timeUnit)
deploy
in interface InternalGridServiceManager
public String getCodeBaseURL()
getCodeBaseURL
in interface InternalGridServiceManager
public org.jini.rio.monitor.event.Events getEvents(int maxEvents)
getEvents
in interface InternalGridServiceManager
Copyright © GigaSpaces.