gnu.mapping
Class ThreadLocation
- Named
public class ThreadLocation
A Location that forwards to a thread-specific Location.
static String | ANONYMOUS - Magic property value used for the "anonymous" ThreadLocations.
|
entered , get , get , getBase , getKeyProperty , getKeySymbol , getValue , isBound , isConstant , make , make , make , print , set , setRestore , setValue , setWithSave , toString , undefine |
ANONYMOUS
public static final String ANONYMOUS
Magic property value used for the "anonymous" ThreadLocations.
These are thread-specific dynamic "parameters" (in the SRFI-39 sense)
that are not tied to a specfic name.
ThreadLocation
public ThreadLocation()
A new anonymous fluid location.
ThreadLocation
public ThreadLocation(String name)
A new anonymous fluid location but used a given name for printing.
However, the binding is not bound to the name as a visible binding.
ThreadLocation
public ThreadLocation(Symbol name,
Object property,
Location global)
get
public Object get(Object defaultValue)
- get in interface Location
getInstance
public static ThreadLocation getInstance(Symbol name,
Object property)
For a given (Symbol. property)-pair, find or create
a matching ThreadLocation.
getLocation
public Location getLocation()
Get the thread-specific Location for this Location.
makePrivate
public static ThreadLocation makePrivate(String name)
Create a fresh ThreadLocation, independent of other ThreaDLocations.
Creates new unique EnvironmentKey, using a unique property key.
name
- used for printing, but not identification.
set
public void set(Object value)
- set in interface Location
setGlobal
public void setGlobal(Object value)
Set the default/global value.
setName
public void setName(String name)
- setName in interface Named
setRestore
public void setRestore(Object oldValue,
CallContext ctx)
Restore an old value.
- setRestore in interface Location
oldValue
- the return value from a prior setWithSave.
setWithSave
public Object setWithSave(Object newValue,
CallContext ctx)
Set a value, but return cookie so old value can be restored.
This is intended for fluid-let where (in the case of multiple threads)
a simple save-restore isn't always the right thing.
- setWithSave in interface Location