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()
Clears the cache and returns all objects in an unmodifiable collection.
|
Object |
get(String name)
Gets 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)
Removes the object with this name from the cache.
|
Object remove(String name)
name - The object name.Collection<Object> clear()
Object get(String name)
name - The name of the object.Object put(String name, Object value)
name - The key.value - The new candidate value.Copyright © 2019 Pivotal Software, Inc.. All rights reserved.