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(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).
|
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
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.
|
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 |
undeployProcessingUnitsAndWait(ProcessingUnit[] processingUnits,
long timeout,
TimeUnit timeUnit) |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public DefaultGridServiceManagers(InternalAdmin admin)
public Admin getAdmin()
AdminAware
Admin
associated with this element.getAdmin
in interface AdminAware
public GridServiceManagerAddedEventManager getGridServiceManagerAdded()
GridServiceManagers
GridServiceManagerAddedEventListener
s.getGridServiceManagerAdded
in interface GridServiceManagers
public GridServiceManagerRemovedEventManager getGridServiceManagerRemoved()
GridServiceManagers
GridServiceManagerRemovedEventListener
s.getGridServiceManagerRemoved
in interface GridServiceManagers
public GridServiceManager[] getManagers()
GridServiceManagers
getManagers
in interface GridServiceManagers
public GridServiceManager[] getManagersNonFiltered()
getManagersNonFiltered
in interface InternalGridServiceManagers
public GridServiceManager getManagerByUID(String uid)
GridServiceManagers
getManagerByUID
in interface GridServiceManagers
GridComponent.getUid()
public Map<String,GridServiceManager> getUids()
GridServiceManagers
getUids
in interface GridServiceManagers
public int getSize()
GridServiceManagers
getSize
in interface GridServiceManagers
public boolean isEmpty()
GridServiceManagers
true
if there are no managers, false
otherwise.isEmpty
in interface GridServiceManagers
public GridServiceManager waitForAtLeastOne()
GridServiceManagers
waitForAtLeastOne
in interface GridServiceManagers
public GridServiceManager waitForAtLeastOne(long timeout, TimeUnit timeUnit)
GridServiceManagers
waitForAtLeastOne
in interface GridServiceManagers
public boolean waitFor(int numberOfGridServiceManagers)
GridServiceManagers
waitFor
in interface GridServiceManagers
numberOfGridServiceManagers
- The number of managers to wait forpublic boolean waitFor(int numberOfGridServiceManagers, long timeout, TimeUnit timeUnit)
GridServiceManagers
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.
waitFor
in interface GridServiceManagers
numberOfGridServiceManagers
- The number of managers to wait forpublic ProcessingUnit deploy(ProcessingUnitDeployment deployment)
GridServiceManagers
The deployment process will wait indefinitely and return the actual processing unit that can be used.
deploy
in interface GridServiceManagers
public ProcessingUnit deploy(ProcessingUnitDeployment deployment, long timeout, TimeUnit timeUnit)
GridServiceManagers
The deployment process will wait for the given timeout and return the actual processing unit that can be used.
deploy
in interface GridServiceManagers
public ProcessingUnit deploy(SpaceDeployment deployment)
GridServiceManagers
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 GridServiceManagers
public ProcessingUnit deploy(SpaceDeployment deployment, long timeout, TimeUnit timeUnit)
GridServiceManagers
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
in interface GridServiceManagers
public ProcessingUnit deploy(MemcachedDeployment deployment, long timeout, TimeUnit timeUnit)
GridServiceManagers
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
in interface GridServiceManagers
public ProcessingUnit deploy(MemcachedDeployment deployment)
GridServiceManagers
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 GridServiceManagers
public ProcessingUnit deploy(ElasticSpaceDeployment deployment) throws ProcessingUnitAlreadyDeployedException
GridServiceManagers
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 GridServiceManagers
ProcessingUnitAlreadyDeployedException
public ProcessingUnit deploy(ElasticSpaceDeployment deployment, long timeout, TimeUnit timeUnit) throws ProcessingUnitAlreadyDeployedException
GridServiceManagers
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 GridServiceManagers
ProcessingUnitAlreadyDeployedException
public ProcessingUnit deploy(ElasticStatefulProcessingUnitDeployment deployment) throws ProcessingUnitAlreadyDeployedException
GridServiceManagers
The deployment process will wait indefinitely and return the actual processing unit that can be used.
deploy
in interface GridServiceManagers
ProcessingUnitAlreadyDeployedException
- - processing unit with the same name has
already been deployed.public ProcessingUnit deploy(ElasticStatefulProcessingUnitDeployment deployment, long timeout, TimeUnit timeUnit) throws ProcessingUnitAlreadyDeployedException
GridServiceManagers
The deployment process will wait for the given timeout and return the actual processing unit that can be used.
deploy
in interface GridServiceManagers
ProcessingUnitAlreadyDeployedException
- - processing unit with the same name has
already been deployed.public ProcessingUnit deploy(ElasticStatelessProcessingUnitDeployment deployment) throws ProcessingUnitAlreadyDeployedException
GridServiceManagers
The deployment process will wait indefinitely and return the actual processing unit that can be used.
deploy
in interface GridServiceManagers
ProcessingUnitAlreadyDeployedException
- - processing unit with the same name has
already been deployed.public ProcessingUnit deploy(ElasticStatelessProcessingUnitDeployment deployment, long timeout, TimeUnit timeUnit) throws ProcessingUnitAlreadyDeployedException
GridServiceManagers
The deployment process will wait for the given timeout and return the actual processing unit that can be used.
deploy
in interface GridServiceManagers
ProcessingUnitAlreadyDeployedException
- - processing unit with the same name has
already been deployed.public Application deploy(ApplicationDeployment deployment) throws ApplicationAlreadyDeployedException, ProcessingUnitAlreadyDeployedException
GridServiceManagers
The deployment process will wait indefinitely
deploy
in interface GridServiceManagers
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 deployment, long timeout, TimeUnit timeUnit) throws ApplicationAlreadyDeployedException, ProcessingUnitAlreadyDeployedException
GridServiceManagers
The deployment process will wait for the given timeout
deploy
in interface GridServiceManagers
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 void addLifecycleListener(GridServiceManagerLifecycleEventListener eventListener)
GridServiceManagers
GridServiceManagerLifecycleEventListener
.addLifecycleListener
in interface GridServiceManagers
public void removeLifecycleListener(GridServiceManagerLifecycleEventListener eventListener)
GridServiceManagers
GridServiceManagerLifecycleEventListener
.removeLifecycleListener
in interface GridServiceManagers
public Iterator<GridServiceManager> iterator()
iterator
in interface Iterable<GridServiceManager>
public void addGridServiceManager(InternalGridServiceManager gridServiceManager)
addGridServiceManager
in interface InternalGridServiceManagers
public InternalGridServiceManager removeGridServiceManager(String uid)
removeGridServiceManager
in interface InternalGridServiceManagers
public InternalGridServiceManager replaceGridServiceManager(InternalGridServiceManager gridServiceManager)
InternalGridServiceManagers
replaceGridServiceManager
in interface InternalGridServiceManagers
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... processor) throws AdminException
DumpProvider
generateDump
in interface DumpProvider
cause
- The cause this dump was generated.context
- Allows to provide specific parameters to specific processors.processor
- The list of processors to be used.AdminException
public boolean undeployProcessingUnitsAndWait(ProcessingUnit[] processingUnits, long timeout, TimeUnit timeUnit)
undeployProcessingUnitsAndWait
in interface InternalGridServiceManagers
public ProcessingUnit deploy(Application application, ProcessingUnitDeploymentTopology puDeploymentTopology, long timeout, TimeUnit timeUnit)
deploy
in interface InternalGridServiceManagers
public Application deploy(ApplicationConfig applicationConfig)
GridServiceManagers
The deployment process will wait indefinitely
deploy
in interface GridServiceManagers
public Application deploy(ApplicationConfig applicationConfig, long timeout, TimeUnit timeUnit) throws ApplicationAlreadyDeployedException, ProcessingUnitAlreadyDeployedException
GridServiceManagers
The deployment process will wait for the given timeout
deploy
in interface GridServiceManagers
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)Copyright © GigaSpaces.