Package org.openspaces.admin.gsc
Interface GridServiceContainers
- All Superinterfaces:
AdminAware,DumpProvider,Iterable<GridServiceContainer>
- All Known Subinterfaces:
InternalGridServiceContainers
- All Known Implementing Classes:
DefaultGridServiceContainers
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
Modifier and TypeMethodDescriptionvoidaddLifecycleListener(GridServiceContainerLifecycleEventListener eventListener) Allows to add aGridServiceContainerLifecycleEventListener.getContainerByUID(String uid) Returns a container based on its uid.Returns all the currently discovered containers.Returns the grid service container added event manager allowing to add and removeGridServiceContainerAddedEventListeners.Returns the grid service container added event manager allowing to add and removeGridServiceContainerRemovedEventListeners.intgetSize()Returns the number of containers current discovered.getUids()Returns a map of grid service container with the key as the uid.booleanisEmpty()Returnstrueif there are no containers,falseotherwise.voidAllows to remove aGridServiceContainerLifecycleEventListener.booleanwaitFor(int numberOfGridServiceContainers) Waits indefinitely till the provided number of containers are up.booleanWaits for the given timeout (in time unit) till the provided number of containers are up.Methods inherited from interface org.openspaces.admin.AdminAware
getAdminMethods inherited from interface org.openspaces.admin.dump.DumpProvider
generateDump, generateDumpMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getContainers
GridServiceContainer[] getContainers()Returns all the currently discovered containers. -
getContainerByUID
Returns a container based on its uid.- See Also:
-
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()Returnstrueif there are no containers,falseotherwise. -
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
Waits for the given timeout (in time unit) till the provided number of containers are up. Returnstrueif the required number of containers were discovered,falseif 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 removeGridServiceContainerAddedEventListeners. -
getGridServiceContainerRemoved
GridServiceContainerRemovedEventManager getGridServiceContainerRemoved()Returns the grid service container added event manager allowing to add and removeGridServiceContainerRemovedEventListeners. -
addLifecycleListener
Allows to add aGridServiceContainerLifecycleEventListener. -
removeLifecycleListener
Allows to remove aGridServiceContainerLifecycleEventListener.
-