public class DefaultApplications extends Object implements InternalApplications
| Constructor and Description |
|---|
DefaultApplications(InternalAdmin admin) |
| Modifier and Type | Method and Description |
|---|---|
void |
addApplication(Application application,
ProcessingUnit processingUnit) |
void |
addLifecycleListener(ApplicationLifecycleEventListener eventListener)
Allows to add a
ApplicationLifecycleEventListener. |
Admin |
getAdmin()
Returns the
Admin associated with this element. |
Application |
getApplication(String name)
Returns the
Application for the given processing
unit name. |
ApplicationAddedEventManager |
getApplicationAdded()
Returns an event manager allowing to register
ApplicationAddedEventListeners. |
ApplicationRemovedEventManager |
getApplicationRemoved()
Returns an event manager allowing to register
ProcessingUnitRemovedEventListeners. |
Application[] |
getApplications()
Returns the
Applications currently deployed. |
Map<String,Application> |
getNames()
Returns a map of
Application keyed by their
respective names. |
int |
getSize()
Returns the number of currently deployed
Applications. |
boolean |
isEmpty()
Returns
true if there are no currently deployed applications. |
Iterator<Application> |
iterator() |
void |
removeLifecycleListener(ApplicationLifecycleEventListener eventListener)
Allows to remove a
ApplicationLifecycleEventListener. |
void |
removeProcessingUnit(ProcessingUnit processingUnit) |
Application |
waitFor(String applicationName)
Waits indefinitely till the application is identified as deployed.
|
Application |
waitFor(String applicationName,
long timeout,
TimeUnit timeUnit)
Waits for the specified timeout (in time interval) till the application is identified as
deployed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DefaultApplications(InternalAdmin admin)
public Application[] getApplications()
ApplicationsApplications currently deployed.getApplications in interface Applicationspublic int getSize()
ApplicationsApplications.getSize in interface Applicationspublic boolean isEmpty()
Applicationstrue if there are no currently deployed applications.isEmpty in interface Applicationspublic Application getApplication(String name)
ApplicationsApplication for the given processing
unit name.getApplication in interface Applicationspublic Map<String,Application> getNames()
ApplicationsApplication keyed by their
respective names.getNames in interface Applicationspublic Application waitFor(String applicationName)
ApplicationsApplication.waitFor in interface Applicationspublic Application waitFor(String applicationName, long timeout, TimeUnit timeUnit)
ApplicationsApplication. Return
null if the application is not deployed within the specified timeout.waitFor in interface Applicationspublic ApplicationAddedEventManager getApplicationAdded()
ApplicationsApplicationAddedEventListeners.getApplicationAdded in interface Applicationspublic ApplicationRemovedEventManager getApplicationRemoved()
ApplicationsProcessingUnitRemovedEventListeners.getApplicationRemoved in interface Applicationspublic void addLifecycleListener(ApplicationLifecycleEventListener eventListener)
ApplicationsApplicationLifecycleEventListener.addLifecycleListener in interface Applicationspublic void removeLifecycleListener(ApplicationLifecycleEventListener eventListener)
ApplicationsApplicationLifecycleEventListener.removeLifecycleListener in interface Applicationspublic Iterator<Application> iterator()
iterator in interface Iterable<Application>public Admin getAdmin()
AdminAwareAdmin associated with this element.getAdmin in interface AdminAwarepublic void addApplication(Application application, ProcessingUnit processingUnit)
addApplication in interface InternalApplicationspublic void removeProcessingUnit(ProcessingUnit processingUnit)
removeProcessingUnit in interface InternalApplicationsCopyright © GigaSpaces.