org.eclipse.xtext.util
Class OnChangeEvictingCache
java.lang.Object
org.eclipse.xtext.util.OnChangeEvictingCache
- All Implemented Interfaces:
- IResourceScopeCache
public class OnChangeEvictingCache
- extends java.lang.Object
- implements IResourceScopeCache
- Author:
- Sven Efftinge - Initial contribution and API
Method Summary |
void |
clear(org.eclipse.emf.ecore.resource.Resource resource)
|
<Result,Param extends org.eclipse.emf.ecore.resource.Resource>
Result |
|
execWithoutCacheClear(Param resource,
IUnitOfWork<Result,Param> transaction)
|
|
get(java.lang.Object key,
org.eclipse.emf.ecore.resource.Resource resource,
com.google.inject.Provider<T> provider)
A cache associates values to the given resource under the given key. |
OnChangeEvictingCache.CacheAdapter |
getOrCreate(org.eclipse.emf.ecore.resource.Resource resource)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OnChangeEvictingCache
public OnChangeEvictingCache()
clear
public void clear(org.eclipse.emf.ecore.resource.Resource resource)
- Specified by:
clear
in interface IResourceScopeCache
get
public <T> T get(java.lang.Object key,
org.eclipse.emf.ecore.resource.Resource resource,
com.google.inject.Provider<T> provider)
- Description copied from interface:
IResourceScopeCache
- A cache associates values to the given resource under the given key.
The default implementation releases any values as soon as a semantic change occurs in any EObjects contained in the given resource.
- Specified by:
get
in interface IResourceScopeCache
- Returns:
- the cached value or what the provider returns if no cached value exists
getOrCreate
public OnChangeEvictingCache.CacheAdapter getOrCreate(org.eclipse.emf.ecore.resource.Resource resource)
execWithoutCacheClear
public <Result,Param extends org.eclipse.emf.ecore.resource.Resource> Result execWithoutCacheClear(Param resource,
IUnitOfWork<Result,Param> transaction)
throws org.eclipse.emf.common.util.WrappedException
- Throws:
org.eclipse.emf.common.util.WrappedException