Package com.intellij.util.concurrency
Class BlockingSet<T>
java.lang.Object
com.intellij.util.concurrency.BlockingSet<T>
Naive implementation of blocking set: class that allows
put(Object) lock by the key specified and
remove(Object) it. The main feature is that another invocation of put(Object) with the same key could not
be proceeded while one won't call remove(Object) with this key.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> BlockingSet<T> voidAcquires lock bykey.voidReleases lock bykey.
-
Constructor Details
-
BlockingSet
public BlockingSet()
-
-
Method Details
-
put
Acquires lock bykey. If lock bykeyhas been already acquired wait until it is released. Acquire is not reentrant. -
remove
Releases lock bykey. If lock has not been acquired throwsIllegalStateException.- Throws:
IllegalStateException- if lock bykeyhas not been acquired.
-
newInstance
-