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
ApplicationAddedEventListener s. |
ApplicationRemovedEventManager |
getApplicationRemoved()
Returns an event manager allowing to register
ProcessingUnitRemovedEventListener s. |
Application[] |
getApplications()
Returns the
Application s currently deployed. |
Map<String,Application> |
getNames()
Returns a map of
Application keyed by their
respective names. |
int |
getSize()
Returns the number of currently deployed
Application s. |
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, wait
forEach, spliterator
public DefaultApplications(InternalAdmin admin)
public Application[] getApplications()
Applications
Application
s currently deployed.getApplications
in interface Applications
public int getSize()
Applications
Application
s.getSize
in interface Applications
public boolean isEmpty()
Applications
true
if there are no currently deployed applications.isEmpty
in interface Applications
public Application getApplication(String name)
Applications
Application
for the given processing
unit name.getApplication
in interface Applications
public Map<String,Application> getNames()
Applications
Application
keyed by their
respective names.getNames
in interface Applications
public Application waitFor(String applicationName)
Applications
Application
.waitFor
in interface Applications
public Application waitFor(String applicationName, long timeout, TimeUnit timeUnit)
Applications
Application
. Return
null
if the application is not deployed within the specified timeout.waitFor
in interface Applications
public ApplicationAddedEventManager getApplicationAdded()
Applications
ApplicationAddedEventListener
s.getApplicationAdded
in interface Applications
public ApplicationRemovedEventManager getApplicationRemoved()
Applications
ProcessingUnitRemovedEventListener
s.getApplicationRemoved
in interface Applications
public void addLifecycleListener(ApplicationLifecycleEventListener eventListener)
Applications
ApplicationLifecycleEventListener
.addLifecycleListener
in interface Applications
public void removeLifecycleListener(ApplicationLifecycleEventListener eventListener)
Applications
ApplicationLifecycleEventListener
.removeLifecycleListener
in interface Applications
public Iterator<Application> iterator()
iterator
in interface Iterable<Application>
public Admin getAdmin()
AdminAware
Admin
associated with this element.getAdmin
in interface AdminAware
public void addApplication(Application application, ProcessingUnit processingUnit)
addApplication
in interface InternalApplications
public void removeProcessingUnit(ProcessingUnit processingUnit)
removeProcessingUnit
in interface InternalApplications
Copyright © GigaSpaces.