Package org.eclipse.team.core
Interface ICache
public interface ICache
A cache that is associated with a synchronization that allows clients
to cache synchronization state related to their model for the duration of the
operation. When the context is disposed, the cache will be disposed and any
listeners notified.
- Since:
- 3.2
- Restriction:
- This interface is not intended to be implemented by clients.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCacheListener
(ICacheListener listener) Add a listener to the cache that will receive notification when the cache is disposed.Retrieve an object that has been cached with the contextvoid
Cache the given object with this context.void
Remove the named object from the cachevoid
removeCacheListener
(ICacheListener listener) Remove the listener.void
removeDisposeListener
(ICacheListener listener) Deprecated.
-
Method Details
-
put
Cache the given object with this context.- Parameters:
name
- the name that uniquely identifies the objectvalue
- the value to be cached.
-
get
Retrieve an object that has been cached with the context- Parameters:
name
- the name of the object- Returns:
- the object associated with the name or
null
-
remove
Remove the named object from the cache- Parameters:
name
- the name
-
addCacheListener
Add a listener to the cache that will receive notification when the cache is disposed. Adding a listener that has already been added has no effect.- Parameters:
listener
- the listener to add
-
removeCacheListener
Remove the listener. Removing a listener that is not registered has no effect.- Parameters:
listener
- the listener to remove- Since:
- 3.3
-
removeDisposeListener
Deprecated.Remove the listener. Removing a listener that is not registered has no effect.- Parameters:
listener
- the listener to remove
-
removeCacheListener(ICacheListener)