public interface ScopeCache
GenericScope
to use to manage cached bean instances.
Implementations generally fall into two categories: those that store values "globally" (i.e. one instance per key),
and those that store potentially multiple instances per key based on context (e.g. via a thread local). All
implementations should be thread safe.Modifier and Type | Method and Description |
---|---|
Collection<Object> |
clear()
Clear the cache and return all objects in an unmodifiable collection.
|
Object |
get(String name)
Get the named object from the cache.
|
Object |
put(String name,
Object value)
Put a value in the cache if the key is not already used.
|
Object |
remove(String name)
Remove the object with this name from the cache.
|
Object remove(String name)
name
- the object nameCollection<Object> clear()
Object get(String name)
name
- the name of the objectObject put(String name, Object value)
name
- the keyvalue
- the new candidate valueCopyright © 2017 Pivotal Software, Inc.. All rights reserved.