GigaSpaces XAP 9.7.2 API

org.openspaces.admin.gsm
Interface GridServiceManagers

All Superinterfaces:
AdminAware, DumpProvider, Iterable<GridServiceManager>

public interface GridServiceManagers
extends AdminAware, Iterable<GridServiceManager>, DumpProvider

Grid Service Containers hold all the different GridServiceManagers that are currently discovered.

Provides simple means to get all the current managers, as well as as registering for manager lifecycle (added and removed) events.

Also provides the ability to deploy a processing unit or a space (which is also a processing unit, that simply just starts a space) on a randomly selected GSM (more control on which manager to deploy can use GridServiceManager.deploy(org.openspaces.admin.pu.ProcessingUnitDeployment).

Author:
kimchy

Method Summary
 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(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 a random 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 a random grid service manager (it will act as the primary GSM for the deployed processing unit).
 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).
 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.
 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.
 void removeLifecycleListener(GridServiceManagerLifecycleEventListener eventListener)
          Allows to remove a GridServiceManagerLifecycleEventListener.
 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 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.
 
Methods inherited from interface org.openspaces.admin.AdminAware
getAdmin
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface org.openspaces.admin.dump.DumpProvider
generateDump, generateDump
 

Method Detail

getManagers

GridServiceManager[] getManagers()
Returns all the currently discovered managers.


getManagerByUID

GridServiceManager getManagerByUID(String uid)
Returns a manager based on its uid.

See Also:
GridComponent.getUid()

getUids

Map<String,GridServiceManager> getUids()
Returns a map of grid service manager with the key as the uid.


getSize

int getSize()
Returns the number of managers current discovered.


isEmpty

boolean isEmpty()
Returns true if there are no managers, false otherwise.


waitForAtLeastOne

GridServiceManager waitForAtLeastOne()
Waits indefinitely till at least one GSM is discovered and returns it.


waitForAtLeastOne

GridServiceManager waitForAtLeastOne(long timeout,
                                     TimeUnit timeUnit)
Waits for the given timeout (in time unit) till at least one GSM is discovered and returns it.


waitFor

boolean waitFor(int numberOfGridServiceManagers)
Waits indefinitely till the provided number of managers are up. When passing 0, will wait till there are no more managers.

Parameters:
numberOfGridServiceManagers - The number of managers to wait for

waitFor

boolean waitFor(int numberOfGridServiceManagers,
                long timeout,
                TimeUnit timeUnit)
Waits for the given timeout (in time unit) till the provided number of managers are up. Returns true if the required number of managers were discovered, false if the timeout expired.

When passing 0, will wait till there are no more managers.

Parameters:
numberOfGridServiceManagers - The number of managers to wait for

deploy

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).

The deployment process will wait indefinitely and return the actual processing unit that can be used.


deploy

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).

The deployment process will wait for the given timeout and return the actual processing unit that can be used.


deploy

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).

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

ProcessingUnit deploy(MemcachedDeployment deployment,
                      long timeout,
                      TimeUnit timeUnit)
Deploys a memcached based on the space deployment information on a random grid service manager (it will act as the primary GSM for the deployed processing unit).

The 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

ProcessingUnit deploy(MemcachedDeployment deployment)
Deploys a memcached based on the space deployment information on a random grid service manager (it will act as the primary GSM for the deployed processing unit).

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

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).

The 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

ProcessingUnit deploy(ElasticSpaceDeployment deployment)
                      throws ProcessingUnitAlreadyDeployedException
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).

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.

Throws:
ProcessingUnitAlreadyDeployedException

deploy

ProcessingUnit deploy(ElasticSpaceDeployment deployment,
                      long timeout,
                      TimeUnit timeUnit)
                      throws ProcessingUnitAlreadyDeployedException
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).

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.

Throws:
ProcessingUnitAlreadyDeployedException

deploy

ProcessingUnit deploy(ElasticStatefulProcessingUnitDeployment deployment)
                      throws ProcessingUnitAlreadyDeployedException
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).

The deployment process will wait indefinitely and return the actual processing unit that can be used.

Throws:
ProcessingUnitAlreadyDeployedException - - processing unit with the same name has already been deployed.

deploy

ProcessingUnit deploy(ElasticStatefulProcessingUnitDeployment deployment,
                      long timeout,
                      TimeUnit timeUnit)
                      throws ProcessingUnitAlreadyDeployedException
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).

The deployment process will wait for the given timeout and return the actual processing unit that can be used.

Throws:
ProcessingUnitAlreadyDeployedException - - processing unit with the same name has already been deployed.

deploy

ProcessingUnit deploy(ElasticStatelessProcessingUnitDeployment deployment)
                      throws ProcessingUnitAlreadyDeployedException
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).

The deployment process will wait indefinitely and return the actual processing unit that can be used.

Throws:
ProcessingUnitAlreadyDeployedException - - processing unit with the same name has already been deployed.

deploy

ProcessingUnit deploy(ElasticStatelessProcessingUnitDeployment deployment,
                      long timeout,
                      TimeUnit timeUnit)
                      throws ProcessingUnitAlreadyDeployedException
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).

The deployment process will wait for the given timeout and return the actual processing unit that can be used.

Throws:
ProcessingUnitAlreadyDeployedException - - processing unit with the same name has already been deployed.

deploy

Application deploy(ApplicationDeployment deployment)
                   throws ApplicationAlreadyDeployedException,
                          ProcessingUnitAlreadyDeployedException
Deploys an application consisting of one or more processing unit deployments.

The deployment process will wait indefinitely

Returns:
An application containing the actual processing units that can be used.
Throws:
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)

deploy

Application deploy(ApplicationDeployment deployment,
                   long timeout,
                   TimeUnit timeUnit)
                   throws ApplicationAlreadyDeployedException,
                          ProcessingUnitAlreadyDeployedException
Deploys an application consisting of one or more processing unit deployments.

The deployment process will wait for the given timeout

Returns:
An application containing the actual processing units that can be used or null if timeout expired.
Throws:
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)

deploy

Application deploy(ApplicationConfig applicationConfig)
Deploys an application consisting of one or more processing unit deployments.

The deployment process will wait indefinitely

Returns:
An application containing the actual processing units that can be used.
Throws:
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)

deploy

Application deploy(ApplicationConfig applicationConfig,
                   long timeout,
                   TimeUnit timeUnit)
                   throws ApplicationAlreadyDeployedException,
                          ProcessingUnitAlreadyDeployedException
Deploys an application consisting of one or more processing unit deployments.

The deployment process will wait for the given timeout

Returns:
An application configuration containing the actual processing units that can be used or null if timeout expired.
Throws:
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)

getGridServiceManagerAdded

GridServiceManagerAddedEventManager getGridServiceManagerAdded()
Returns the grid service manager added event manager allowing to add and remove GridServiceManagerAddedEventListeners.


getGridServiceManagerRemoved

GridServiceManagerRemovedEventManager getGridServiceManagerRemoved()
Returns the grid service container added event manager allowing to add and remove GridServiceManagerRemovedEventListeners.


addLifecycleListener

void addLifecycleListener(GridServiceManagerLifecycleEventListener eventListener)
Allows to add a GridServiceManagerLifecycleEventListener.


removeLifecycleListener

void removeLifecycleListener(GridServiceManagerLifecycleEventListener eventListener)
Allows to remove a GridServiceManagerLifecycleEventListener.


GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.