GigaSpaces XAP 9.7.2 API

org.openspaces.admin.gsc
Interface GridServiceContainers

All Superinterfaces:
AdminAware, DumpProvider, Iterable<GridServiceContainer>

public interface GridServiceContainers
extends AdminAware, Iterable<GridServiceContainer>, DumpProvider

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

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

Author:
kimchy

Method Summary
 void addLifecycleListener(GridServiceContainerLifecycleEventListener eventListener)
          Allows to add a GridServiceContainerLifecycleEventListener.
 GridServiceContainer getContainerByUID(String uid)
          Returns a container based on its uid.
 GridServiceContainer[] getContainers()
          Returns all the currently discovered containers.
 ElasticGridServiceContainerProvisioningFailureEventManager getElasticGridServiceContainerProvisioningFailure()
          Returns the elastic grid service container provisioning failure event manager allowing to add and remove ElasticGridServiceContainerProvisioningFailureEventListeners.
 ElasticGridServiceContainerProvisioningProgressChangedEventManager getElasticGridServiceContainerProvisioningProgressChanged()
          Returns the elastic grid service container provisioning progress event manager allowing to add and remove ElasticGridServiceContainerProvisioningProgressChangedEventListeners.
 GridServiceContainerAddedEventManager getGridServiceContainerAdded()
          Returns the grid service container added event manager allowing to add and remove GridServiceContainerAddedEventListeners.
 GridServiceContainerRemovedEventManager getGridServiceContainerRemoved()
          Returns the grid service container added event manager allowing to add and remove GridServiceContainerRemovedEventListeners.
 int getSize()
          Returns the number of containers current discovered.
 Map<String,GridServiceContainer> getUids()
          Returns a map of grid service container with the key as the uid.
 boolean isEmpty()
          Returns true if there are no containers, false otherwise.
 void removeLifecycleListener(GridServiceContainerLifecycleEventListener eventListener)
          Allows to remove a GridServiceContainerLifecycleEventListener.
 boolean waitFor(int numberOfGridServiceContainers)
          Waits indefinitely till the provided number of containers are up.
 boolean waitFor(int numberOfGridServiceContainers, long timeout, TimeUnit timeUnit)
          Waits for the given timeout (in time unit) till the provided number of containers are up.
 
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

getContainers

GridServiceContainer[] getContainers()
Returns all the currently discovered containers.


getContainerByUID

GridServiceContainer getContainerByUID(String uid)
Returns a container based on its uid.

See Also:
GridComponent.getUid()

getUids

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


getSize

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


isEmpty

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


waitFor

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

Parameters:
numberOfGridServiceContainers - The number of containers to wait for

waitFor

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

When passing 0, will wait till there are not more containers.

Parameters:
numberOfGridServiceContainers - The number of containers to wait for

getGridServiceContainerAdded

GridServiceContainerAddedEventManager getGridServiceContainerAdded()
Returns the grid service container added event manager allowing to add and remove GridServiceContainerAddedEventListeners.


getGridServiceContainerRemoved

GridServiceContainerRemovedEventManager getGridServiceContainerRemoved()
Returns the grid service container added event manager allowing to add and remove GridServiceContainerRemovedEventListeners.


addLifecycleListener

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


removeLifecycleListener

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


getElasticGridServiceContainerProvisioningFailure

ElasticGridServiceContainerProvisioningFailureEventManager getElasticGridServiceContainerProvisioningFailure()
Returns the elastic grid service container provisioning failure event manager allowing to add and remove ElasticGridServiceContainerProvisioningFailureEventListeners.

Since:
8.0.6

getElasticGridServiceContainerProvisioningProgressChanged

ElasticGridServiceContainerProvisioningProgressChangedEventManager getElasticGridServiceContainerProvisioningProgressChanged()
Returns the elastic grid service container provisioning progress event manager allowing to add and remove ElasticGridServiceContainerProvisioningProgressChangedEventListeners.

Since:
8.0.6

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.