Class DefaultMachines
java.lang.Object
org.openspaces.admin.internal.machine.DefaultMachines
- All Implemented Interfaces:
Iterable<Machine>,AdminAware,InternalMachines,Machines
- Author:
- kimchy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLifecycleListener(MachineLifecycleEventListener eventListener) Allows to add aMachineLifecycleEventListener.voidaddMachine(InternalMachine machine) getAdmin()Returns theAdminassociated with this element.Returns a map of machines by host address.Returns a map of machines by host names.Returns the machines added event manager allowing to add and removeMachineAddedEventListeners.getMachineByHostAddress(String ipAddress) Returns the machine by the host address.getMachineByHostName(String hostName) Returns the machine by the host name.getMachineByUID(String uid) Returns the grid service container added event manager allowing to add and removeMachineRemovedEventListeners.Machine[]Returns all currently discovered machines.intgetSize()Returns the number of machines current discovered.getUids()Returns a map of machines with the key as the uid.booleanisEmpty()Returnstrueif there are no machines,falseotherwise.iterator()voidremoveLifeycleListener(MachineLifecycleEventListener eventListener) Allows to remove aMachineLifecycleEventListener.voidremoveMachine(Machine machine) booleanwaitFor(int numberOfMachines) Waits indefinitely till the provided number of machines are up.booleanWaits for the given timeout (in time unit) till the provided number of machines are up.Waits indefinitely till the machine with the given host (name/address) is discovered.Waits for the given timeout (in time unit) till the machien with the given host (name/address) is discovered.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DefaultMachines
-
-
Method Details
-
getAdmin
Description copied from interface:AdminAwareReturns theAdminassociated with this element.- Specified by:
getAdminin interfaceAdminAware
-
getMachines
Description copied from interface:MachinesReturns all currently discovered machines.- Specified by:
getMachinesin interfaceMachines
-
getMachineAdded
Description copied from interface:MachinesReturns the machines added event manager allowing to add and removeMachineAddedEventListeners.- Specified by:
getMachineAddedin interfaceMachines
-
getMachineRemoved
Description copied from interface:MachinesReturns the grid service container added event manager allowing to add and removeMachineRemovedEventListeners.- Specified by:
getMachineRemovedin interfaceMachines
-
getSize
public int getSize()Description copied from interface:MachinesReturns the number of machines current discovered. -
isEmpty
public boolean isEmpty()Description copied from interface:MachinesReturnstrueif there are no machines,falseotherwise. -
waitFor
public boolean waitFor(int numberOfMachines) Description copied from interface:MachinesWaits indefinitely till the provided number of machines are up. -
waitFor
Description copied from interface:MachinesWaits for the given timeout (in time unit) till the provided number of machines are up. Returnstrueif the required number of machines were discovered,falseif the timeout expired. -
waitFor
Description copied from interface:MachinesWaits indefinitely till the machine with the given host (name/address) is discovered. -
waitFor
Description copied from interface:MachinesWaits for the given timeout (in time unit) till the machien with the given host (name/address) is discovered. Returns the machine if it was discovered within the provided timeout, ornullif the machine was not discovered. -
iterator
-
getMachineByUID
- Specified by:
getMachineByUIDin interfaceInternalMachines
-
getMachineByHostAddress
Description copied from interface:MachinesReturns the machine by the host address.- Specified by:
getMachineByHostAddressin interfaceMachines- Parameters:
ipAddress- The host address to lookup the machine by- Returns:
- The machine correlated to the specified host address,
nullif there is no one
-
getMachineByHostName
Description copied from interface:MachinesReturns the machine by the host name.- Specified by:
getMachineByHostNamein interfaceMachines
-
getUids
Description copied from interface:MachinesReturns a map of machines with the key as the uid. -
getHostsByAddress
Description copied from interface:MachinesReturns a map of machines by host address.- Specified by:
getHostsByAddressin interfaceMachines
-
getHostsByName
Description copied from interface:MachinesReturns a map of machines by host names.- Specified by:
getHostsByNamein interfaceMachines
-
addLifecycleListener
Description copied from interface:MachinesAllows to add aMachineLifecycleEventListener.- Specified by:
addLifecycleListenerin interfaceMachines
-
removeLifeycleListener
Description copied from interface:MachinesAllows to remove aMachineLifecycleEventListener.- Specified by:
removeLifeycleListenerin interfaceMachines
-
addMachine
- Specified by:
addMachinein interfaceInternalMachines
-
removeMachine
- Specified by:
removeMachinein interfaceInternalMachines
-