Package com.oracle.coherence.common.base
Class NonBlocking
- java.lang.Object
-
- com.oracle.coherence.common.base.NonBlocking
-
- All Implemented Interfaces:
AutoCloseable
public class NonBlocking extends Object implements AutoCloseable
NonBlocking allows a thread to mark itself as non-blocking and should be exempt from things such as flow-control pauses using a try-with-resource pattern.try (NonBlocking e = new NonBlocking()) { // NonBlocking.isNonBlockingCaller() will now be true, and FlowControlled elements should respect this and not block } // NonBlocking.isNonBlockingCaller() will have been restored to its former value
-
-
Constructor Summary
Constructors Constructor Description NonBlocking()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static booleanisNonBlockingCaller()Return true if the the calling thread has been marked as non-blocking
-
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
isNonBlockingCaller
public static boolean isNonBlockingCaller()
Return true if the the calling thread has been marked as non-blocking- Returns:
- true iff the calling thread is marked as non-blocking
-
-