Brooklyn

brooklyn.location.basic
[Java] Class BasicLocationRegistry

java.lang.Object
  brooklyn.location.basic.BasicLocationRegistry
All Implemented Interfaces:
LocationRegistry

@SuppressWarnings({"rawtypes","unchecked"})
public class BasicLocationRegistry

Field Summary
static Logger log

protected java.util.Map resolvers

protected java.lang.ThreadLocal specsSeen

to catch circular references

 
Constructor Summary
BasicLocationRegistry(ManagementContext mgmt)

protected BasicLocationRegistry()

protected BasicLocationRegistry(java.util.Map properties)

 
Method Summary
boolean canResolve(java.lang.String spec)

static java.util.List expandCommaSeparateLocations(java.lang.String locations)

Splits a comma-separated list of locations (names or specs) into an explicit list.

protected void findDefinedLocations()

protected void findServices()

LocationDefinition getDefinedLocation(java.lang.String id)

LocationDefinition getDefinedLocationByName(java.lang.String name)

java.util.Map getDefinedLocations()

java.util.List getLocationsById(java.lang.Iterable specs)

@deprecated use resolve

java.util.Map getProperties()

protected LocationResolver getSpecDefaultResolver(java.lang.String spec)

protected LocationResolver getSpecFirstResolver(java.lang.String spec, java.lang.String... resolversToCheck)

protected LocationResolver getSpecResolver(java.lang.String spec)

static boolean isResolverPrefixForSpec(LocationResolver resolver, java.lang.String spec, boolean argumentRequired)

providers default impl for RegistryLocationResolver.accepts

void removeDefinedLocation(java.lang.String id)

Location resolve(java.lang.String spec)

Location resolve(java.lang.String spec, java.util.Map locationFlags)

java.util.List resolve(java.lang.Iterable spec)

Expects a collection of strings being the spec for locations, returns a list of locations.

Location resolve(LocationDefinition ld)

Location resolveLocationDefinition(LocationDefinition ld, java.util.Map locationFlags, java.lang.String optionalName)

static void setupLocationRegistryForTesting(ManagementContext mgmt)

void updateDefinedLocation(LocationDefinition l)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

log

public static final Logger log


resolvers

protected final java.util.Map resolvers


specsSeen

protected java.lang.ThreadLocal specsSeen
to catch circular references


 
Constructor Detail

BasicLocationRegistry

public BasicLocationRegistry(ManagementContext mgmt)


BasicLocationRegistry

@Deprecated
protected BasicLocationRegistry()


BasicLocationRegistry

@Deprecated
protected BasicLocationRegistry(java.util.Map properties)


 
Method Detail

canResolve

public boolean canResolve(java.lang.String spec)


expandCommaSeparateLocations

public static java.util.List expandCommaSeparateLocations(java.lang.String locations)
Splits a comma-separated list of locations (names or specs) into an explicit list. The splitting is very careful to handle commas embedded within specs, to split correctly.


findDefinedLocations

protected void findDefinedLocations()


findServices

protected void findServices()


getDefinedLocation

public LocationDefinition getDefinedLocation(java.lang.String id)


getDefinedLocationByName

public LocationDefinition getDefinedLocationByName(java.lang.String name)


getDefinedLocations

public java.util.Map getDefinedLocations()


getLocationsById

public java.util.List getLocationsById(java.lang.Iterable specs)
deprecated:
use resolve


getProperties

public java.util.Map getProperties()


getSpecDefaultResolver

protected LocationResolver getSpecDefaultResolver(java.lang.String spec)


getSpecFirstResolver

protected LocationResolver getSpecFirstResolver(java.lang.String spec, java.lang.String... resolversToCheck)


getSpecResolver

protected LocationResolver getSpecResolver(java.lang.String spec)


isResolverPrefixForSpec

public static boolean isResolverPrefixForSpec(LocationResolver resolver, java.lang.String spec, boolean argumentRequired)
providers default impl for RegistryLocationResolver.accepts


removeDefinedLocation

@Override
public void removeDefinedLocation(java.lang.String id)


resolve

public final Location resolve(java.lang.String spec)


resolve

public Location resolve(java.lang.String spec, java.util.Map locationFlags)


resolve

public java.util.List resolve(java.lang.Iterable spec)
Expects a collection of strings being the spec for locations, returns a list of locations. Also allows single elements which are comma-separated lists of locations.

For legacy compatibility this also accepts nested lists, but that is deprecated (and triggers a warning).


resolve

@Override
public Location resolve(LocationDefinition ld)


resolveLocationDefinition

public Location resolveLocationDefinition(LocationDefinition ld, java.util.Map locationFlags, java.lang.String optionalName)


setupLocationRegistryForTesting

@VisibleForTesting
public static void setupLocationRegistryForTesting(ManagementContext mgmt)


updateDefinedLocation

@Override
public void updateDefinedLocation(LocationDefinition l)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.