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

 
Constructor Summary
BasicLocationRegistry(ManagementContext mgmt)

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

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 findServices()

LocationDefinition getDefinedLocation(java.lang.String id)

LocationDefinition getDefinedLocationById(java.lang.String id)

LocationDefinition getDefinedLocationByName(java.lang.String name)

java.util.Map getDefinedLocations()

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

java.util.Map getProperties()

protected LocationResolver getSpecDefaultResolver(java.lang.String spec)

providers default impl for RegistryLocationResolver.accepts

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)

@deprecated since 0.5; use resolve

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)

Location resolve(LocationDefinition ld)

Location resolveIfPossible(java.lang.String spec)

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

static void setupLocationRegistryForTesting(ManagementContext mgmt)

void updateDefinedLocation(LocationDefinition l)

void updateDefinedLocations()

 
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


 
Constructor Detail

BasicLocationRegistry

public BasicLocationRegistry(ManagementContext mgmt)


 
Method Detail

canMaybeResolve

if (!canMaybeResolve(spec)) return null;
public boolean canMaybeResolve(java.lang.String spec)


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.


findServices

protected void findServices()


getDefinedLocation

public LocationDefinition getDefinedLocation(String id) {
return getDefinedLocationById(id);
public LocationDefinition getDefinedLocation(java.lang.String id)


getDefinedLocationById

return definedLocations.get(id);
public LocationDefinition getDefinedLocationById(java.lang.String id)


getDefinedLocationByName

synchronized (definedLocations) {
public LocationDefinition getDefinedLocationByName(java.lang.String name)


getDefinedLocations

synchronized (definedLocations) {
public java.util.Map getDefinedLocations()


getLocationsById

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


getProperties

}
public java.util.Map getProperties()


getSpecDefaultResolver

protected LocationResolver getSpecDefaultResolver(java.lang.String spec)
providers default impl for RegistryLocationResolver.accepts


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)
deprecated:
since 0.5; use resolve


removeDefinedLocation

synchronized (definedLocations) {
public void removeDefinedLocation(java.lang.String id)


resolve

log.trace("Unable to resolve "+spec+": "+e, e);
public final Location resolve(java.lang.String spec)


resolve

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


resolve

} else if (id instanceof Iterable) {
public java.util.List resolve(java.lang.Iterable spec)


resolve

}
public Location resolve(LocationDefinition ld)


resolveIfPossible

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


resolveLocationDefinition

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


setupLocationRegistryForTesting

public static void setupLocationRegistryForTesting(ManagementContext mgmt)


updateDefinedLocation

synchronized (definedLocations) {
public void updateDefinedLocation(LocationDefinition l)


updateDefinedLocations

public void updateDefinedLocations()


 

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