GigaSpaces XAP 9.7.2 API

org.openspaces.admin.esm
Interface ElasticServiceManagers

All Superinterfaces:
AdminAware, DumpProvider, Iterable<ElasticServiceManager>

public interface ElasticServiceManagers
extends AdminAware, Iterable<ElasticServiceManager>, DumpProvider

Provides simple means to get all the current managers, as well as as registering for manager life-cycle (added and removed) events.

 Disclaimer: This interface and the elastic data grid functionality is provided as a technology preview in XAP 7.1. 
 As such, it is subject to API and behavior changes in the next XAP releases without going through the usual deprecation process 
 of the XAP API.
 


Method Summary
 void addLifecycleListener(ElasticServiceManagerLifecycleEventListener eventListener)
          Allows to add a ElasticServiceManagerLifecycleEventListener.
 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.
 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.
 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.
 
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

getManagers

ElasticServiceManager[] getManagers()
Returns all the currently discovered managers.


getManagerByUID

ElasticServiceManager getManagerByUID(String uid)
Returns a manager based on its uid.

See Also:
GridComponent.getUid()

getUids

Map<String,ElasticServiceManager> getUids()
Returns a map of elastic service manager with the key as the uid.


getSize

int getSize()
Returns the number of managers currently discovered.


isEmpty

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


waitForAtLeastOne

ElasticServiceManager waitForAtLeastOne()
Waits indefinitely till at least one ESM is discovered and returns it.


waitForAtLeastOne

ElasticServiceManager waitForAtLeastOne(long timeout,
                                        TimeUnit timeUnit)
Waits for the given timeout (in time unit) till at least one ESM is discovered and returns it.


waitFor

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

Parameters:
numberOfElasticServiceManagers - The number of managers to wait for

waitFor

boolean waitFor(int numberOfElasticServiceManagers,
                long timeout,
                TimeUnit timeUnit)
Waits for the given timeout (in time unit) till the provided number of managers are up. Returns 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.

Parameters:
numberOfElasticServiceManagers - The number of managers to wait for

getElasticServiceManagerAdded

ElasticServiceManagerAddedEventManager getElasticServiceManagerAdded()
Returns the grid service manager added event manager allowing to add and remove GridServiceManagerAddedEventListeners.


getElasticServiceManagerRemoved

ElasticServiceManagerRemovedEventManager getElasticServiceManagerRemoved()
Returns the grid service container added event manager allowing to add and remove GridServiceManagerRemovedEventListeners.


addLifecycleListener

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


removeLifecycleListener

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


GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.