org.jetbrains.kotlin.storage
Class LockBasedStorageManager

java.lang.Object
  extended by org.jetbrains.kotlin.storage.LockBasedStorageManager

public class LockBasedStorageManager
extends java.lang.Object


Nested Class Summary
static interface LockBasedStorageManager.ExceptionHandlingStrategy
           
 
Field Summary
protected  java.util.concurrent.locks.Lock lock
           
static StorageManager NO_LOCKS
           
 
Constructor Summary
  LockBasedStorageManager()
           
protected LockBasedStorageManager(LockBasedStorageManager.ExceptionHandlingStrategy exceptionHandlingStrategy)
           
 
Method Summary
<T> T
compute(kotlin.Function0<? extends T> computable)
           
static LockBasedStorageManager createDelegatingWithSameLock(LockBasedStorageManager base, LockBasedStorageManager.ExceptionHandlingStrategy newStrategy)
           
<T>
createLazyValue(kotlin.Function0<? extends T> computable)
           
<T>
createLazyValueWithPostCompute(kotlin.Function0<? extends T> computable, kotlin.Function1<? super java.lang.Boolean,? extends T> onRecursiveCall, kotlin.Function1<? super T,? extends kotlin.Unit> postCompute)
           
<K,V>
createMemoizedFunction(kotlin.Function1<? super K,? extends V> compute)
           
<K,V>
createMemoizedFunction(kotlin.Function1<? super K,? extends V> compute, java.util.concurrent.ConcurrentMap<K,java.lang.Object> map)
           
<K,V>
createMemoizedFunctionWithNullableValues(kotlin.Function1<? super K,? extends V> compute)
           
<K,V>
createMemoizedFunctionWithNullableValues(kotlin.Function1<? super K,? extends V> compute, java.util.concurrent.ConcurrentMap<K,java.lang.Object> map)
           
<T>
createNullableLazyValue(kotlin.Function0<? extends T> computable)
           
<T>
createNullableLazyValueWithPostCompute(kotlin.Function0<? extends T> computable, kotlin.Function1<? super T,? extends kotlin.Unit> postCompute)
           
<T>
createRecursionTolerantLazyValue(kotlin.Function0<? extends T> computable, T onRecursiveCall)
           
<T>
createRecursionTolerantNullableLazyValue(kotlin.Function0<? extends T> computable, T onRecursiveCall)
           
static LockBasedStorageManager createWithExceptionHandling(LockBasedStorageManager.ExceptionHandlingStrategy exceptionHandlingStrategy)
           
protected
<T> org.jetbrains.kotlin.storage.LockBasedStorageManager.RecursionDetectedResult<T>
recursionDetectedDefault()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_LOCKS

public static final StorageManager NO_LOCKS

lock

protected final java.util.concurrent.locks.Lock lock
Constructor Detail

LockBasedStorageManager

public LockBasedStorageManager()

LockBasedStorageManager

protected LockBasedStorageManager(@NotNull
                                  LockBasedStorageManager.ExceptionHandlingStrategy exceptionHandlingStrategy)
Method Detail

createWithExceptionHandling

@NotNull
public static LockBasedStorageManager createWithExceptionHandling(@NotNull
                                                                          LockBasedStorageManager.ExceptionHandlingStrategy exceptionHandlingStrategy)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

createMemoizedFunction

@NotNull
public <K,V>  createMemoizedFunction(@NotNull
                                                  kotlin.Function1<? super K,? extends V> compute)

createMemoizedFunction

@NotNull
public <K,V>  createMemoizedFunction(@NotNull
                                                  kotlin.Function1<? super K,? extends V> compute,
                                                  @NotNull
                                                  java.util.concurrent.ConcurrentMap<K,java.lang.Object> map)

createMemoizedFunctionWithNullableValues

@NotNull
public <K,V>  createMemoizedFunctionWithNullableValues(@NotNull
                                                                    kotlin.Function1<? super K,? extends V> compute)

createMemoizedFunctionWithNullableValues

@NotNull
public <K,V>  createMemoizedFunctionWithNullableValues(@NotNull
                                                                    kotlin.Function1<? super K,? extends V> compute,
                                                                    @NotNull
                                                                    java.util.concurrent.ConcurrentMap<K,java.lang.Object> map)

createLazyValue

@NotNull
public <T>  createLazyValue(@NotNull
                                         kotlin.Function0<? extends T> computable)

createRecursionTolerantLazyValue

@NotNull
public <T>  createRecursionTolerantLazyValue(@NotNull
                                                          kotlin.Function0<? extends T> computable,
                                                          @NotNull
                                                          T onRecursiveCall)

createLazyValueWithPostCompute

@NotNull
public <T>  createLazyValueWithPostCompute(@NotNull
                                                        kotlin.Function0<? extends T> computable,
                                                        kotlin.Function1<? super java.lang.Boolean,? extends T> onRecursiveCall,
                                                        @NotNull
                                                        kotlin.Function1<? super T,? extends kotlin.Unit> postCompute)

createNullableLazyValue

@NotNull
public <T>  createNullableLazyValue(@NotNull
                                                 kotlin.Function0<? extends T> computable)

createRecursionTolerantNullableLazyValue

@NotNull
public <T>  createRecursionTolerantNullableLazyValue(@NotNull
                                                                  kotlin.Function0<? extends T> computable,
                                                                  T onRecursiveCall)

createNullableLazyValueWithPostCompute

@NotNull
public <T>  createNullableLazyValueWithPostCompute(@NotNull
                                                                kotlin.Function0<? extends T> computable,
                                                                @NotNull
                                                                kotlin.Function1<? super T,? extends kotlin.Unit> postCompute)

compute

public <T> T compute(@NotNull
                     kotlin.Function0<? extends T> computable)

recursionDetectedDefault

@NotNull
protected <T> org.jetbrains.kotlin.storage.LockBasedStorageManager.RecursionDetectedResult<T> recursionDetectedDefault()

createDelegatingWithSameLock

@NotNull
public static LockBasedStorageManager createDelegatingWithSameLock(@NotNull
                                                                           LockBasedStorageManager base,
                                                                           @NotNull
                                                                           LockBasedStorageManager.ExceptionHandlingStrategy newStrategy)