public class DefaultGridServiceContainers extends Object implements InternalGridServiceContainers
Constructor and Description |
---|
DefaultGridServiceContainers(InternalAdmin admin) |
Modifier and Type | Method and Description |
---|---|
void |
addGridServiceContainer(InternalGridServiceContainer gridServiceContainer) |
void |
addLifecycleListener(GridServiceContainerLifecycleEventListener eventListener)
Allows to add a
GridServiceContainerLifecycleEventListener . |
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. |
GridServiceContainer |
getContainerByUID(String uid)
Returns a container based on its uid.
|
GridServiceContainer[] |
getContainers()
Returns all the currently discovered containers.
|
GridServiceContainerAddedEventManager |
getGridServiceContainerAdded()
Returns the grid service container added event manager allowing to add and remove
GridServiceContainerAddedEventListener s. |
GridServiceContainerRemovedEventManager |
getGridServiceContainerRemoved()
Returns the grid service container added event manager allowing to add and remove
GridServiceContainerRemovedEventListener s. |
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. |
Iterator<GridServiceContainer> |
iterator() |
InternalGridServiceContainer |
removeGridServiceContainer(String uid) |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public DefaultGridServiceContainers(InternalAdmin admin)
public Admin getAdmin()
AdminAware
Admin
associated with this element.getAdmin
in interface AdminAware
public GridServiceContainerAddedEventManager getGridServiceContainerAdded()
GridServiceContainers
GridServiceContainerAddedEventListener
s.getGridServiceContainerAdded
in interface GridServiceContainers
public GridServiceContainerRemovedEventManager getGridServiceContainerRemoved()
GridServiceContainers
GridServiceContainerRemovedEventListener
s.getGridServiceContainerRemoved
in interface GridServiceContainers
public GridServiceContainer[] getContainers()
GridServiceContainers
getContainers
in interface GridServiceContainers
public GridServiceContainer getContainerByUID(String uid)
GridServiceContainers
getContainerByUID
in interface GridServiceContainers
GridComponent.getUid()
public Map<String,GridServiceContainer> getUids()
GridServiceContainers
getUids
in interface GridServiceContainers
public int getSize()
GridServiceContainers
getSize
in interface GridServiceContainers
public boolean isEmpty()
GridServiceContainers
true
if there are no containers, false
otherwise.isEmpty
in interface GridServiceContainers
public boolean waitFor(int numberOfGridServiceContainers)
GridServiceContainers
waitFor
in interface GridServiceContainers
numberOfGridServiceContainers
- The number of containers to wait forpublic boolean waitFor(int numberOfGridServiceContainers, long timeout, TimeUnit timeUnit)
GridServiceContainers
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.
waitFor
in interface GridServiceContainers
numberOfGridServiceContainers
- The number of containers to wait forpublic void addLifecycleListener(GridServiceContainerLifecycleEventListener eventListener)
GridServiceContainers
GridServiceContainerLifecycleEventListener
.addLifecycleListener
in interface GridServiceContainers
public void removeLifecycleListener(GridServiceContainerLifecycleEventListener eventListener)
GridServiceContainers
GridServiceContainerLifecycleEventListener
.removeLifecycleListener
in interface GridServiceContainers
public Iterator<GridServiceContainer> iterator()
iterator
in interface Iterable<GridServiceContainer>
public void addGridServiceContainer(InternalGridServiceContainer gridServiceContainer)
addGridServiceContainer
in interface InternalGridServiceContainers
public InternalGridServiceContainer removeGridServiceContainer(String uid)
removeGridServiceContainer
in interface InternalGridServiceContainers
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
Copyright © GigaSpaces.