public class DefaultGridServiceManagers extends Object implements InternalGridServiceManagers
| Constructor and Description |
|---|
DefaultGridServiceManagers(InternalAdmin admin) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGridServiceManager(InternalGridServiceManager gridServiceManager) |
void |
addLifecycleListener(GridServiceManagerLifecycleEventListener eventListener)
Allows to add a
GridServiceManagerLifecycleEventListener. |
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 deployment,
long timeout,
TimeUnit timeUnit)
Deploys an application consisting of one or more processing unit deployments.
|
ProcessingUnit |
deploy(Application application,
ProcessingUnitDeploymentTopology puDeploymentTopology,
long timeout,
TimeUnit timeUnit) |
ProcessingUnit |
deploy(ProcessingUnitDeployment deployment)
Deploys a processing unit based on the processing unit deployment information on a random
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 a random
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 a random 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 a random grid service manager
(it will act as the primary GSM for the deployed processing unit).
|
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... processor)
Generates dump for the provided processors.
|
Admin |
getAdmin()
Returns the
Admin associated with this element. |
GridServiceManagerAddedEventManager |
getGridServiceManagerAdded()
Returns the grid service manager added event manager allowing to add and remove
GridServiceManagerAddedEventListeners. |
GridServiceManagerRemovedEventManager |
getGridServiceManagerRemoved()
Returns the grid service container added event manager allowing to add and remove
GridServiceManagerRemovedEventListeners. |
GridServiceManager |
getManagerByUID(String uid)
Returns a manager based on its uid.
|
GridServiceManager[] |
getManagers()
Returns all the currently discovered managers.
|
GridServiceManager[] |
getManagersNonFiltered() |
int |
getSize()
Returns the number of managers current discovered.
|
Map<String,GridServiceManager> |
getUids()
Returns a map of grid service manager with the key as the uid.
|
boolean |
isEmpty()
Returns
true if there are no managers, false otherwise. |
Iterator<GridServiceManager> |
iterator() |
InternalGridServiceManager |
removeGridServiceManager(String uid) |
void |
removeLifecycleListener(GridServiceManagerLifecycleEventListener eventListener)
Allows to remove a
GridServiceManagerLifecycleEventListener. |
InternalGridServiceManager |
replaceGridServiceManager(InternalGridServiceManager gridServiceManager)
Replaces the grid service manager, returning the old one
|
boolean |
waitFor(int numberOfGridServiceManagers)
Waits indefinitely till the provided number of managers are up.
|
boolean |
waitFor(int numberOfGridServiceManagers,
long timeout,
TimeUnit timeUnit)
Waits for the given timeout (in time unit) till the provided number of managers are up.
|
GridServiceManager |
waitForActiveManager() |
GridServiceManager |
waitForActiveManager(long timeout,
TimeUnit timeUnit) |
GridServiceManager |
waitForAtLeastOne()
Waits indefinitely till at least one GSM is discovered and returns it.
|
GridServiceManager |
waitForAtLeastOne(long timeout,
TimeUnit timeUnit)
Waits for the given timeout (in time unit) till at least one GSM is discovered and returns
it.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DefaultGridServiceManagers(InternalAdmin admin)
public Admin getAdmin()
AdminAwareAdmin associated with this element.getAdmin in interface AdminAwarepublic GridServiceManagerAddedEventManager getGridServiceManagerAdded()
GridServiceManagersGridServiceManagerAddedEventListeners.getGridServiceManagerAdded in interface GridServiceManagerspublic GridServiceManagerRemovedEventManager getGridServiceManagerRemoved()
GridServiceManagersGridServiceManagerRemovedEventListeners.getGridServiceManagerRemoved in interface GridServiceManagerspublic GridServiceManager[] getManagers()
GridServiceManagersgetManagers in interface GridServiceManagerspublic GridServiceManager[] getManagersNonFiltered()
getManagersNonFiltered in interface InternalGridServiceManagerspublic GridServiceManager getManagerByUID(String uid)
GridServiceManagersgetManagerByUID in interface GridServiceManagersGridComponent.getUid()public Map<String,GridServiceManager> getUids()
GridServiceManagersgetUids in interface GridServiceManagerspublic int getSize()
GridServiceManagersgetSize in interface GridServiceManagerspublic boolean isEmpty()
GridServiceManagerstrue if there are no managers, false otherwise.isEmpty in interface GridServiceManagerspublic GridServiceManager waitForAtLeastOne()
GridServiceManagerswaitForAtLeastOne in interface GridServiceManagerspublic GridServiceManager waitForActiveManager()
waitForActiveManager in interface GridServiceManagersnull if non available in the default time-out.public GridServiceManager waitForActiveManager(long timeout, TimeUnit timeUnit)
waitForActiveManager in interface GridServiceManagersnull if non available in the specified time-outpublic GridServiceManager waitForAtLeastOne(long timeout, TimeUnit timeUnit)
GridServiceManagerswaitForAtLeastOne in interface GridServiceManagerspublic boolean waitFor(int numberOfGridServiceManagers)
GridServiceManagerswaitFor in interface GridServiceManagersnumberOfGridServiceManagers - The number of managers to wait forpublic boolean waitFor(int numberOfGridServiceManagers,
long timeout,
TimeUnit timeUnit)
GridServiceManagerstrue if the required number of managers were discovered,
false if the timeout expired.
When passing 0, will wait till there are no more managers.
waitFor in interface GridServiceManagersnumberOfGridServiceManagers - The number of managers to wait forpublic ProcessingUnit deploy(ProcessingUnitDeployment deployment)
GridServiceManagersThe deployment process will wait indefinitely and return the actual processing unit that can be used.
deploy in interface GridServiceManagerspublic ProcessingUnit deploy(ProcessingUnitDeployment deployment, long timeout, TimeUnit timeUnit)
GridServiceManagersThe deployment process will wait for the given timeout and return the actual processing unit that can be used.
deploy in interface GridServiceManagerspublic ProcessingUnit deploy(SpaceDeployment deployment)
GridServiceManagersThe 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 GridServiceManagerspublic ProcessingUnit deploy(SpaceDeployment deployment, long timeout, TimeUnit timeUnit)
GridServiceManagersThe deployment process will wait for the provided 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 GridServiceManagerspublic Application deploy(ApplicationDeployment deployment) throws ApplicationAlreadyDeployedException, ProcessingUnitAlreadyDeployedException
GridServiceManagersThe deployment process will wait indefinitely
deploy in interface GridServiceManagersApplicationAlreadyDeployedException - - 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 deployment, long timeout, TimeUnit timeUnit) throws ApplicationAlreadyDeployedException, ProcessingUnitAlreadyDeployedException
GridServiceManagersThe deployment process will wait for the given timeout
deploy in interface GridServiceManagersApplicationAlreadyDeployedException - - 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 void addLifecycleListener(GridServiceManagerLifecycleEventListener eventListener)
GridServiceManagersGridServiceManagerLifecycleEventListener.addLifecycleListener in interface GridServiceManagerspublic void removeLifecycleListener(GridServiceManagerLifecycleEventListener eventListener)
GridServiceManagersGridServiceManagerLifecycleEventListener.removeLifecycleListener in interface GridServiceManagerspublic Iterator<GridServiceManager> iterator()
iterator in interface Iterable<GridServiceManager>public void addGridServiceManager(InternalGridServiceManager gridServiceManager)
addGridServiceManager in interface InternalGridServiceManagerspublic InternalGridServiceManager removeGridServiceManager(String uid)
removeGridServiceManager in interface InternalGridServiceManagerspublic InternalGridServiceManager replaceGridServiceManager(InternalGridServiceManager gridServiceManager)
InternalGridServiceManagersreplaceGridServiceManager in interface InternalGridServiceManagerspublic 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... processor) throws AdminException
DumpProvidergenerateDump in interface DumpProvidercause - The cause this dump was generated.context - Allows to provide specific parameters to specific processors.processor - The list of processors to be used.AdminExceptionpublic ProcessingUnit deploy(Application application, ProcessingUnitDeploymentTopology puDeploymentTopology, long timeout, TimeUnit timeUnit)
deploy in interface InternalGridServiceManagerspublic Application deploy(ApplicationConfig applicationConfig)
GridServiceManagersThe deployment process will wait indefinitely
deploy in interface GridServiceManagerspublic Application deploy(ApplicationConfig applicationConfig, long timeout, TimeUnit timeUnit) throws ApplicationAlreadyDeployedException, ProcessingUnitAlreadyDeployedException
GridServiceManagersThe deployment process will wait for the given timeout
deploy in interface GridServiceManagersApplicationAlreadyDeployedException - - 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)Copyright © GigaSpaces.