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) |
Map<String,String> |
deleteUndeployedPuData(String puName)
Delete data of a given undeployed tiered storage processing unit
|
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(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() |
ServiceID |
getServiceID() |
String |
getUid()
Returns the unique id of the grid component.
|
List<UndeployedPuMetaData> |
getUnDeployedPus() |
int |
hashCode() |
void |
incrementInstance(ProcessingUnit processingUnit) |
boolean |
isActiveManager() |
boolean |
isDeployed(String processingUnitName)
Determine if this deployment is known to this GSM.
|
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 |
setUndeployedInstanceIp(String puName,
String instanceId,
String ip,
boolean validateHost)
Set ip of an instance in an undeployed tiered storage processing unit.
|
void |
setUndeployedLeader(String puName,
int partitionId,
String instanceId)
Set leader of a partition in an undeployed tiered storage processing unit.
|
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(Deploy deploy,
ProcessingUnitConfig puConfig,
String applicationName,
String[] groups,
LookupLocator[] locators,
com.gigaspaces.grid.gsm.GSM gsm,
List<InstanceSLA> instanceSLAS) |
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.
|
getAgentId, getAgentUid, getGridServiceAgent, kill, restart, setGridServiceAgentaddZone, assertStateChangesPermitted, getAdmin, getJVMDetails, getMachine, getOperatingSystem, getTransport, getVirtualMachine, getZones, isDiscovered, setDiscovered, setMachine, setOperatingSystem, setTransport, setVirtualMachineclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetAgentUid, setGridServiceAgentgetAgentId, getGridServiceAgent, kill, restartgetAdminsetDiscoveredisDiscoveredsetMachinegetMachinesetTransportgetTransportsetOperatingSystemgetOperatingSystemgetJVMDetailssetVirtualMachinegetVirtualMachineaddZonepublic DefaultGridServiceManager(ServiceID serviceID, com.gigaspaces.grid.gsm.GSM gsm, InternalAdmin admin, int agentId, String agentUid, JVMDetails jvmDetails) throws RemoteException
RemoteExceptionpublic ServiceGridAdminDriver getDriver()
getDriver in interface InternalGridServiceManagerpublic String getUid()
GridComponentgetUid in interface GridComponentgetUid in interface InternalVirtualMachineInfoProviderpublic ServiceID getServiceID()
getServiceID in interface InternalGridServiceManagerpublic com.gigaspaces.grid.gsm.GSM getGSM()
getGSM in interface InternalGridServiceManagerpublic ProcessingUnit deploy(SpaceDeployment deployment)
GridServiceManagerThe 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 GridServiceManagerpublic ProcessingUnit deploy(SpaceDeployment deployment, long timeout, TimeUnit timeUnit)
GridServiceManagerThe 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 GridServiceManagerpublic ProcessingUnit deploy(ProcessingUnitDeployment deployment)
GridServiceManagerThe deployment process will wait indefinitely and return the actual processing unit that can be used.
deploy in interface GridServiceManagerpublic ProcessingUnit deploy(ProcessingUnitDeployment deployment, long timeout, TimeUnit timeUnit)
GridServiceManagerThe deployment process will wait for the given timeout and return the actual processing unit that can be used.
deploy in interface GridServiceManagerpublic ProcessingUnit deploy(ProcessingUnitConfigHolder puConfigHolder)
GridServiceManagerdeploy in interface GridServiceManagerpublic ProcessingUnit deploy(ProcessingUnitConfigHolder puConfigHolder, long timeout, TimeUnit timeUnit)
GridServiceManagerThe deployment process will wait for the given timeout and return the actual processing unit that can be used.
deploy in interface GridServiceManagerpublic static org.jini.rio.core.OperationalString toOperationalString(Properties props, Properties contextProperties) throws Exception
Exceptionpublic 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
Exceptionpublic static org.jini.rio.core.OperationalString toOperationalString(Deploy deploy, ProcessingUnitConfig puConfig, String applicationName, String[] groups, LookupLocator[] locators, com.gigaspaces.grid.gsm.GSM gsm, List<InstanceSLA> instanceSLAS) throws Exception
Exceptionpublic 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 GridServiceManagerpublic void destroyInstance(ProcessingUnitInstance processingUnitInstance)
destroyInstance in interface InternalGridServiceManagerpublic boolean decrementPlannedInstances(ProcessingUnit processingUnit)
InternalGridServiceManagerdecrementPlannedInstances in interface InternalGridServiceManagertrue if a planned instance was successfully decremented;
false planned instances hasn't changed.public void decrementInstance(ProcessingUnitInstance processingUnitInstance)
decrementInstance in interface InternalGridServiceManagerpublic void incrementInstance(ProcessingUnit processingUnit)
incrementInstance in interface InternalGridServiceManagerpublic void relocate(ProcessingUnitInstance processingUnitInstance, GridServiceContainer gridServiceContainer)
relocate in interface InternalGridServiceManagerprocessingUnitInstance - 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
LogProviderGridComponentGridServiceAgent, will get the log through it
instead of creating a load on the actual grid component.logEntries in interface LogProviderGridComponentAdminExceptionpublic LogEntries logEntriesDirect(LogEntryMatcher matcher) throws AdminException
LogProviderGridComponentLogProviderGridComponent.logEntries(com.gigaspaces.log.LogEntryMatcher), but does not try and get the
logs from the agent.logEntriesDirect in interface LogProviderGridComponentAdminExceptionpublic void reloadMetricConfiguration()
throws AdminException
reloadMetricConfiguration in interface MetricProviderAdminExceptionpublic DumpResult generateDump(String cause, Map<String,Object> context) throws AdminException
DumpProvidergenerateDump in interface DumpProvidercause - The cause that this dump was generatedcontext - Allows to provide specific parameters to specific processorsAdminExceptionpublic DumpResult generateDump(String cause, Map<String,Object> context, String... processors) throws AdminException
DumpProvidergenerateDump in interface DumpProvidercause - The cause this dump was generated.context - Allows to provide specific parameters to specific processors.processors - The list of processors to be used.AdminExceptionpublic NIODetails getNIODetails() throws RemoteException
getNIODetails in interface InternalTransportInfoProviderRemoteExceptionpublic NIOStatistics getNIOStatistics() throws RemoteException
getNIOStatistics in interface InternalTransportInfoProviderRemoteExceptionpublic void enableLRMIMonitoring()
throws RemoteException
enableLRMIMonitoring in interface InternalTransportInfoProviderRemoteExceptionpublic void disableLRMIMonitoring()
throws RemoteException
disableLRMIMonitoring in interface InternalTransportInfoProviderRemoteExceptionpublic LRMIMonitoringDetails fetchLRMIMonitoringDetails() throws RemoteException
fetchLRMIMonitoringDetails in interface InternalTransportInfoProviderRemoteExceptionpublic long getCurrentTimeInMillis()
throws RemoteException
getCurrentTimeInMillis in interface InternalOperatingSystemInfoProviderRemoteExceptionpublic OSDetails getOSDetails() throws RemoteException
getOSDetails in interface InternalOperatingSystemInfoProviderRemoteExceptionpublic OSStatistics getOSStatistics() throws RemoteException
getOSStatistics in interface InternalOperatingSystemInfoProviderRemoteExceptionpublic JVMStatistics getJVMStatistics() throws RemoteException
getJVMStatistics in interface InternalVirtualMachineInfoProviderRemoteExceptionpublic void runGc()
throws RemoteException
runGc in interface InternalVirtualMachineInfoProviderRemoteExceptionpublic String[] listDeployDir()
listDeployDir in interface InternalGridServiceManagerpublic boolean isDeployed(String processingUnitName)
GridServiceManagerisDeployed in interface GridServiceManagerprocessingUnitName - the name of the deployed processing unit.true if this deployment is known; false otherwise.public Application deploy(ApplicationDeployment deployment) throws ApplicationAlreadyDeployedException, ProcessingUnitAlreadyDeployedException
GridServiceManagerThe deployment process will wait indefinitely
deploy in interface GridServiceManagerApplicationAlreadyDeployedException - - 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
GridServiceManagerThe deployment process will wait indefinitely
deploy in interface GridServiceManagerApplicationAlreadyDeployedException - - 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
GridServiceManagerThe deployment process will wait for the given timeout
deploy in interface GridServiceManagerApplicationAlreadyDeployedException - - 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
GridServiceManagerThe deployment process will wait for the given timeout
deploy in interface GridServiceManagerApplicationAlreadyDeployedException - - 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 GridServiceManagertrue if managing at least one deployment ; false otherwisepublic boolean deleteResource(String resourceName)
deleteResource in interface GridServiceManagertrue if successfully deleted the resource folder from the deploy folder ;
false otherwisepublic List<UndeployedPuMetaData> getUnDeployedPus()
getUnDeployedPus in interface GridServiceManagerpublic Map<String,String> deleteUndeployedPuData(String puName)
GridServiceManagerdeleteUndeployedPuData in interface GridServiceManagerpublic void setUndeployedLeader(String puName, int partitionId, String instanceId)
GridServiceManagersetUndeployedLeader in interface GridServiceManagerpublic void setUndeployedInstanceIp(String puName, String instanceId, String ip, boolean validateHost)
GridServiceManagersetUndeployedInstanceIp in interface GridServiceManagerpublic ProcessingUnit deploy(Application application, ProcessingUnitDeploymentTopology deploymentTopology, long timeout, TimeUnit timeUnit)
deploy in interface InternalGridServiceManagerpublic String getCodeBaseURL()
getCodeBaseURL in interface InternalGridServiceManagerpublic org.jini.rio.monitor.event.Events getEvents(int maxEvents)
getEvents in interface InternalGridServiceManagerCopyright © GigaSpaces.