Class Mutex.Manager.ForMap<O,​K,​V>

java.lang.Object
org.burningwave.core.extension.concurrent.Mutex.Manager
org.burningwave.core.extension.concurrent.Mutex.Manager.ForMap<O,​K,​V>
All Implemented Interfaces:
AutoCloseable, org.burningwave.core.Cleanable, org.burningwave.core.Closeable, org.burningwave.core.Component, org.burningwave.core.Identifiable, org.burningwave.core.iterable.Properties.Listener, org.burningwave.core.Memorizer
Enclosing class:
Mutex.Manager

public static class Mutex.Manager.ForMap<O,​K,​V>
extends Mutex.Manager
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.burningwave.core.extension.concurrent.Mutex.Manager

    Mutex.Manager.ForMap<O,​K,​V>
  • Method Summary

    Modifier and Type Method Description
    Mutex<K,​V> addMutexFor​(O operation, K key, Predicate<V> predicate)  
    void clearMutexes()  
    void close()  
    static <O,​ K,​ V> Mutex.Manager.ForMap<O,​K,​V> create​(Function<K,​V> valueRetriever)  
    Set<Mutex<K,​V>> getMutexes​(O operation)  
    void unlockMutexes​(O operation, K key, V value)  
    V waitFor​(O operation, K key, Predicate<V> predicate, int... timeout)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.burningwave.core.Cleanable

    clear, clearInBackground

    Methods inherited from interface org.burningwave.core.Closeable

    closeResources, closeResources, createCloseResoucesTask, createCloseResoucesTask

    Methods inherited from interface org.burningwave.core.Identifiable

    getId, getOperationId

    Methods inherited from interface org.burningwave.core.Memorizer

    getOrCreateTemporaryFolder, getOrCreateTemporaryFolder, getTemporaryFolderPrefix

    Methods inherited from interface org.burningwave.core.iterable.Properties.Listener

    checkAndListenTo, checkAndUnregister, listenTo, processChangeNotification, unregister
  • Method Details

    • create

      public static <O,​ K,​ V> Mutex.Manager.ForMap<O,​K,​V> create​(Function<K,​V> valueRetriever)
    • waitFor

      public V waitFor​(O operation, K key, Predicate<V> predicate, int... timeout) throws InterruptedException
      Throws:
      InterruptedException
    • addMutexFor

      public Mutex<K,​V> addMutexFor​(O operation, K key, Predicate<V> predicate)
    • getMutexes

      public Set<Mutex<K,​V>> getMutexes​(O operation)
    • unlockMutexes

      public void unlockMutexes​(O operation, K key, V value)
    • clearMutexes

      public void clearMutexes()
    • close

      public void close()