public interface GridServiceManagers extends AdminAware, Iterable<GridServiceManager>, DumpProvider
GridServiceManager
s 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)
.
Modifier and Type | Method and Description |
---|---|
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(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
GridServiceManagerAddedEventListener s. |
GridServiceManagerRemovedEventManager |
getGridServiceManagerRemoved()
Returns the grid service container added event manager allowing to add and remove
GridServiceManagerRemovedEventListener s. |
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 |
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.
|
getAdmin
forEach, iterator, spliterator
generateDump, generateDump
GridServiceManager[] getManagers()
GridServiceManager getManagerByUID(String uid)
GridComponent.getUid()
Map<String,GridServiceManager> getUids()
int getSize()
boolean isEmpty()
true
if there are no managers, false
otherwise.GridServiceManager waitForActiveManager()
null
if non available in the default time-out.GridServiceManager waitForActiveManager(long timeout, TimeUnit timeUnit)
null
if non available in the specified time-outGridServiceManager waitForAtLeastOne()
GridServiceManager waitForAtLeastOne(long timeout, TimeUnit timeUnit)
boolean waitFor(int numberOfGridServiceManagers)
numberOfGridServiceManagers
- The number of managers to wait forboolean waitFor(int numberOfGridServiceManagers, long timeout, TimeUnit timeUnit)
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.
numberOfGridServiceManagers
- The number of managers to wait forProcessingUnit deploy(ProcessingUnitDeployment deployment)
The deployment process will wait indefinitely and return the actual processing unit that can be used.
ProcessingUnit deploy(ProcessingUnitDeployment deployment, long timeout, TimeUnit timeUnit)
The deployment process will wait for the given timeout and return the actual processing unit that can be used.
ProcessingUnit deploy(SpaceDeployment deployment)
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.
ProcessingUnit deploy(SpaceDeployment deployment, long timeout, TimeUnit timeUnit)
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.
Application deploy(ApplicationDeployment deployment) throws ApplicationAlreadyDeployedException, ProcessingUnitAlreadyDeployedException
The deployment process will wait indefinitely
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)Application deploy(ApplicationDeployment deployment, long timeout, TimeUnit timeUnit) throws ApplicationAlreadyDeployedException, ProcessingUnitAlreadyDeployedException
The deployment process will wait for the given timeout
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)Application deploy(ApplicationConfig applicationConfig)
The deployment process will wait indefinitely
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)Application deploy(ApplicationConfig applicationConfig, long timeout, TimeUnit timeUnit) throws ApplicationAlreadyDeployedException, ProcessingUnitAlreadyDeployedException
The deployment process will wait for the given timeout
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)GridServiceManagerAddedEventManager getGridServiceManagerAdded()
GridServiceManagerAddedEventListener
s.GridServiceManagerRemovedEventManager getGridServiceManagerRemoved()
GridServiceManagerRemovedEventListener
s.void addLifecycleListener(GridServiceManagerLifecycleEventListener eventListener)
GridServiceManagerLifecycleEventListener
.void removeLifecycleListener(GridServiceManagerLifecycleEventListener eventListener)
GridServiceManagerLifecycleEventListener
.Copyright © GigaSpaces.