Interface StrictThreadSettings
-
- All Implemented Interfaces:
public interface StrictThreadSettingsPer-thread MAM strict-mode settings.
-
-
Method Summary
Modifier and Type Method Description abstract voiddisable()Disable all checks for the current thread. abstract voiddisable(MAMStrictCheck check)Disable a specific check. abstract voiddisable(EnumSet<MAMStrictCheck> checks)Disable a set of checks. abstract StrictScopedDisabledisableScoped()Disable all checks until the returned object is closed. abstract StrictScopedDisabledisableScoped(MAMStrictCheck check)Disable a specific check until the returned object is closed. abstract StrictScopedDisabledisableScoped(EnumSet<MAMStrictCheck> checks)Disable a set of checks until the returned object is closed. -
-
Method Detail
-
disable
abstract void disable()
Disable all checks for the current thread. This should not be used on thread-pool threads unless the disable is intended to apply to all tasks handled by the pool. To temporarily disable, use disableScoped instead.
-
disable
abstract void disable(MAMStrictCheck check)
Disable a specific check. This should not be used on thread-pool threads unless the disable is intended to apply to all tasks handled by the pool. To temporarily disable, use disableScoped instead.
- Parameters:
check- check to disable
-
disable
abstract void disable(EnumSet<MAMStrictCheck> checks)
Disable a set of checks. This should not be used on thread-pool threads unless the disable is intended to apply to all tasks handled by the pool. To temporarily disable, use disableScoped instead.
- Parameters:
checks- checks to disable
-
disableScoped
abstract StrictScopedDisable disableScoped()
Disable all checks until the returned object is closed. It is recommended to use this with a try-with-resources block.
- Returns:
AutoCloseable which re-enables checks when it is closed
-
disableScoped
abstract StrictScopedDisable disableScoped(MAMStrictCheck check)
Disable a specific check until the returned object is closed. It is recommended to use this with a try-with-resources block.
- Parameters:
check- check to disable- Returns:
AutoCloseable which re-enables the check when it is closed
-
disableScoped
abstract StrictScopedDisable disableScoped(EnumSet<MAMStrictCheck> checks)
Disable a set of checks until the returned object is closed. It is recommended to use this with a try-with-resources block.
- Parameters:
checks- checks to disable- Returns:
AutoCloseable which re-enables the checks when it is closed
-
-
-
-