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.
put
void put(
String name,
Object value)
- Cache the given object with this context.
-
-
Parameters:
-
name
- the name that uniquely identifies the object -
value
- the value to be cached.
get
Object get(
String name)
- 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
void remove(
String name)
- Remove the named object from the cache
-
-
Parameters:
-
name
- the name
addCacheListener
void addCacheListener(
ICacheListener listener)
- 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
void removeCacheListener(
ICacheListener listener)
- Remove the listener. Removing a listener that is not registered
has no effect.
-
-
Parameters:
-
listener
- the listener to remove -
Since:
- 3.3
removeDisposeListener
void removeDisposeListener(
ICacheListener listener)
-
Deprecated. use
removeCacheListener(ICacheListener)
- Remove the listener. Removing a listener that is not registered
has no effect.
-
-
Parameters:
-
listener
- the listener to remove
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.