public class Locations
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Locations.LocationsFilter |
Modifier and Type | Field and Description |
---|---|
static Locations.LocationsFilter |
USE_FIRST_LOCATION |
Constructor and Description |
---|
Locations() |
Modifier and Type | Method and Description |
---|---|
static java.util.Collection<? extends Location> |
coerceToCollectionOfLocationsManaged(ManagementContext mgmt,
java.lang.Object rawO)
As
LocationRegistry.getListOfLocationsManaged(Object) ,
but using coerceToLocationManaged(ManagementContext, Object)
for more forgiving interpretations. |
static Location |
coerceToLocationManaged(ManagementContext mgmt,
java.lang.Object rawO)
As
LocationRegistry.getLocationManaged(String, Map) but also accepting maps and yaml representations of maps. |
static Maybe<MachineLocation> |
findUniqueMachineLocation(java.lang.Iterable<? extends Location> locations)
|
static Maybe<SshMachineLocation> |
findUniqueSshMachineLocation(java.lang.Iterable<? extends Location> locations)
as
Machines#findUniqueSshMachineLocation(Iterable) |
static java.util.Collection<? extends Location> |
getLocationsCheckingAncestors(java.util.Collection<? extends Location> locations,
Entity entity)
if no locations are supplied, returns locations on the entity, or in the ancestors, until it finds a non-empty set,
or ultimately the empty set if no locations are anywhere
|
static boolean |
isManaged(Location loc) |
static void |
manage(Location loc,
ManagementContext managementContext)
Deprecated.
in 0.6.0; use
LocationManager.createLocation(LocationSpec) instead. |
static void |
unmanage(Location loc) |
public static final Locations.LocationsFilter USE_FIRST_LOCATION
public static Maybe<MachineLocation> findUniqueMachineLocation(java.lang.Iterable<? extends Location> locations)
public static Maybe<SshMachineLocation> findUniqueSshMachineLocation(java.lang.Iterable<? extends Location> locations)
Machines#findUniqueSshMachineLocation(Iterable)
public static java.util.Collection<? extends Location> getLocationsCheckingAncestors(java.util.Collection<? extends Location> locations, Entity entity)
public static boolean isManaged(Location loc)
public static void unmanage(Location loc)
@Deprecated public static void manage(Location loc, ManagementContext managementContext)
LocationManager.createLocation(LocationSpec)
instead.java.lang.IllegalStateException
- if the parent location is not already managedEntities
).public static Location coerceToLocationManaged(ManagementContext mgmt, java.lang.Object rawO)
LocationRegistry.getLocationManaged(String, Map)
but also accepting maps and yaml representations of maps.
The caller is responsible for ensuring the resulting Location
is unmanaged.
public static java.util.Collection<? extends Location> coerceToCollectionOfLocationsManaged(ManagementContext mgmt, java.lang.Object rawO)
LocationRegistry.getListOfLocationsManaged(Object)
,
but using coerceToLocationManaged(ManagementContext, Object)
for more forgiving interpretations.
The caller is responsible for ensuring the resulting Location
is unmanaged.