public class DefaultElasticServiceManagers extends Object implements InternalElasticServiceManagers
| Constructor and Description |
|---|
DefaultElasticServiceManagers(InternalAdmin admin) |
| Modifier and Type | Method and Description |
|---|---|
void |
addElasticServiceManager(InternalElasticServiceManager elasticServiceManager) |
void |
addLifecycleListener(ElasticServiceManagerLifecycleEventListener eventListener)
Allows to add a
ElasticServiceManagerLifecycleEventListener. |
protected void |
assertStateChangesPermitted() |
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. |
ElasticServiceManagerAddedEventManager |
getElasticServiceManagerAdded()
Returns the grid service manager added event manager allowing to add and remove
GridServiceManagerAddedEventListeners. |
ElasticServiceManagerRemovedEventManager |
getElasticServiceManagerRemoved()
Returns the grid service container added event manager allowing to add and remove
GridServiceManagerRemovedEventListeners. |
ElasticServiceManager |
getManagerByUID(String uid)
Returns a manager based on its uid.
|
ElasticServiceManager[] |
getManagers()
Returns all the currently discovered managers.
|
ElasticServiceManager[] |
getManagersNonFiltered() |
int |
getSize()
Returns the number of managers currently discovered.
|
Map<String,ElasticServiceManager> |
getUids()
Returns a map of elastic service manager with the key as the uid.
|
boolean |
isEmpty()
Returns
true if there are no managers, false otherwise. |
Iterator<ElasticServiceManager> |
iterator() |
InternalElasticServiceManager |
removeElasticServiceManager(String uid) |
void |
removeLifecycleListener(ElasticServiceManagerLifecycleEventListener eventListener)
Allows to remove a
ElasticServiceManagerLifecycleEventListener. |
boolean |
waitFor(int numberOfElasticServiceManagers)
Waits indefinitely till the provided number of managers are up.
|
boolean |
waitFor(int numberOfElasticServiceManagers,
long timeout,
TimeUnit timeUnit)
Waits for the given timeout (in time unit) till the provided number of managers are up.
|
ElasticServiceManager |
waitForAtLeastOne()
Waits indefinitely till at least one ESM is discovered and returns it.
|
ElasticServiceManager |
waitForAtLeastOne(long timeout,
TimeUnit timeUnit)
Waits for the given timeout (in time unit) till at least one ESM is discovered and returns
it.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasElasticManagerforEach, spliteratorpublic DefaultElasticServiceManagers(InternalAdmin admin)
public Admin getAdmin()
AdminAwareAdmin associated with this element.getAdmin in interface AdminAwarepublic ElasticServiceManager getManagerByUID(String uid)
ElasticServiceManagersgetManagerByUID in interface ElasticServiceManagersGridComponent.getUid()public ElasticServiceManager[] getManagers()
ElasticServiceManagersgetManagers in interface ElasticServiceManagerspublic int getSize()
ElasticServiceManagersgetSize in interface ElasticServiceManagerspublic Map<String,ElasticServiceManager> getUids()
ElasticServiceManagersgetUids in interface ElasticServiceManagerspublic boolean isEmpty()
ElasticServiceManagerstrue if there are no managers, false otherwise.isEmpty in interface ElasticServiceManagerspublic Iterator<ElasticServiceManager> iterator()
iterator in interface Iterable<ElasticServiceManager>public ElasticServiceManagerAddedEventManager getElasticServiceManagerAdded()
ElasticServiceManagersGridServiceManagerAddedEventListeners.getElasticServiceManagerAdded in interface ElasticServiceManagerspublic ElasticServiceManagerRemovedEventManager getElasticServiceManagerRemoved()
ElasticServiceManagersGridServiceManagerRemovedEventListeners.getElasticServiceManagerRemoved in interface ElasticServiceManagerspublic void addElasticServiceManager(InternalElasticServiceManager elasticServiceManager)
addElasticServiceManager in interface InternalElasticServiceManagerspublic InternalElasticServiceManager removeElasticServiceManager(String uid)
removeElasticServiceManager in interface InternalElasticServiceManagerspublic void addLifecycleListener(ElasticServiceManagerLifecycleEventListener eventListener)
ElasticServiceManagersElasticServiceManagerLifecycleEventListener.addLifecycleListener in interface ElasticServiceManagerspublic void removeLifecycleListener(ElasticServiceManagerLifecycleEventListener eventListener)
ElasticServiceManagersElasticServiceManagerLifecycleEventListener.removeLifecycleListener in interface ElasticServiceManagerspublic boolean waitFor(int numberOfElasticServiceManagers)
ElasticServiceManagerswaitFor in interface ElasticServiceManagersnumberOfElasticServiceManagers - The number of managers to wait forpublic boolean waitFor(int numberOfElasticServiceManagers,
long timeout,
TimeUnit timeUnit)
ElasticServiceManagerstrue 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 ElasticServiceManagersnumberOfElasticServiceManagers - The number of managers to wait forpublic ElasticServiceManager waitForAtLeastOne()
ElasticServiceManagerswaitForAtLeastOne in interface ElasticServiceManagerspublic ElasticServiceManager waitForAtLeastOne(long timeout, TimeUnit timeUnit)
ElasticServiceManagerswaitForAtLeastOne in interface ElasticServiceManagerspublic DumpResult generateDump(String cause, Map<String,Object> context) throws AdminException
DumpProvidergenerateDump in interface DumpProvidercause - The cause that this dump was generatedcontext - Allows to provide specific parameters to specific processorsAdminExceptionpublic DumpResult generateDump(String cause, Map<String,Object> context, String... processor) throws AdminException
DumpProvidergenerateDump in interface DumpProvidercause - The cause this dump was generated.context - Allows to provide specific parameters to specific processors.processor - The list of processors to be used.AdminExceptionprotected void assertStateChangesPermitted()
public ElasticServiceManager[] getManagersNonFiltered()
getManagersNonFiltered in interface InternalElasticServiceManagersCopyright © GigaSpaces.