org.jetbrains.jet.lang.resolve.lazy.storage
Class LockBasedStorageManager
java.lang.Object
org.jetbrains.jet.lang.resolve.lazy.storage.LockBasedStorageManager
- All Implemented Interfaces:
- StorageManager
public class LockBasedStorageManager
- extends java.lang.Object
- implements StorageManager
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LockBasedStorageManager
public LockBasedStorageManager()
createMemoizedFunction
@NotNull
public <K,V> MemoizedFunctionToNotNull<K,V> createMemoizedFunction(@NotNull
com.intellij.util.Function<K,V> compute,
@NotNull
StorageManager.ReferenceKind valuesReferenceKind)
- Description copied from interface:
StorageManager
- Given a function compute: K -> V create a memoized version of it that computes a value only once for each key
- Specified by:
createMemoizedFunction in interface StorageManager
- Parameters:
compute - the function to be memoizedvaluesReferenceKind - how to store the memoized values
NOTE: if compute() has side-effects the WEAK reference kind is dangerous: the side-effects will be repeated if
the value gets collected and then re-computed
createMemoizedFunctionWithNullableValues
@NotNull
public <K,V> MemoizedFunctionToNullable<K,V> createMemoizedFunctionWithNullableValues(@NotNull
com.intellij.util.Function<K,V> compute,
@NotNull
StorageManager.ReferenceKind valuesReferenceKind)
- Specified by:
createMemoizedFunctionWithNullableValues in interface StorageManager
createLazyValue
@NotNull
public <T> NotNullLazyValue<T> createLazyValue(@NotNull
com.intellij.openapi.util.Computable<T> computable)
- Specified by:
createLazyValue in interface StorageManager
createLazyValueWithPostCompute
@NotNull
public <T> NotNullLazyValue<T> createLazyValueWithPostCompute(@NotNull
com.intellij.openapi.util.Computable<T> computable,
@NotNull
com.intellij.util.Consumer<T> postCompute)
- Description copied from interface:
StorageManager
postCompute is called after the value is computed, but before any other thread sees it (the current thread may
see it in between)
- Specified by:
createLazyValueWithPostCompute in interface StorageManager
createNullableLazyValue
@NotNull
public <T> NullableLazyValue<T> createNullableLazyValue(@NotNull
com.intellij.openapi.util.Computable<T> computable)
- Specified by:
createNullableLazyValue in interface StorageManager
createNullableLazyValueWithPostCompute
@NotNull
public <T> NullableLazyValue<T> createNullableLazyValueWithPostCompute(@NotNull
com.intellij.openapi.util.Computable<T> computable,
@NotNull
com.intellij.util.Consumer<T> postCompute)
- Description copied from interface:
StorageManager
postCompute is called after the value is computed, but before any other thread sees it (the current thread may
see it in between)
- Specified by:
createNullableLazyValueWithPostCompute in interface StorageManager
createSafeTrace
@NotNull
public BindingTrace createSafeTrace(@NotNull
BindingTrace originalTrace)
- Specified by:
createSafeTrace in interface StorageManager