Package com.applitools.utils
Class BlockingInstanceContainer<T>
- java.lang.Object
-
- com.applitools.utils.BlockingInstanceContainer<T>
-
public class BlockingInstanceContainer<T> extends Object
A generic container for objects to be shared between threads.
-
-
Constructor Summary
Constructors Constructor Description BlockingInstanceContainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Marks the container as closed.void
put(T underlying)
T
take()
-
-
-
Method Detail
-
put
public void put(T underlying)
- Parameters:
underlying
- The object to set.
-
take
public T take()
- Returns:
- The underlying, or null if the thread was interrupted.
-
close
public void close()
Marks the container as closed. All subsequent calls to(Object)
will throw anIllegalStateException
.
-
-