boolean attempted = Blocker.begin(); try { // blocking operation } finally { Blocker.end(attempted); }
| Modifier and Type | Field and Description |
|---|---|
| private static final JavaLangAccess |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | |
| public static boolean | Returns: true if tryCompensate attemptedtrue if the operation may block, otherwise false blocking)Marks the beginning of a possibly blocking operation. |
| private static Thread | |
| public static void | end(boolean
if tryCompensate attempted attempted)Marks the end of an operation that may have blocked. |
| JLA | back to summary |
|---|---|
| private static final JavaLangAccess JLA | |
| Blocker | back to summary |
|---|---|
| private Blocker() | |
| begin | back to summary |
|---|---|
| public static boolean begin() Marks the beginning of a blocking operation.
| |
| begin | back to summary |
|---|---|
| public static boolean begin(boolean blocking) Marks the beginning of a possibly blocking operation.
| |
| currentCarrierThread | back to summary |
|---|---|
| private static Thread currentCarrierThread() | |
| end | back to summary |
|---|---|
| public static void end(boolean attempted) Marks the end of an operation that may have blocked.
| |