Package com.viaversion.viaversion.util
Class NestingLimiter
java.lang.Object
com.viaversion.viaversion.util.NestingLimiter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic intsetMaxDepth(int maxDepth) Sets the max depth for reads on the current thread.
-
Constructor Details
-
NestingLimiter
public NestingLimiter()
-
-
Method Details
-
setMaxDepth
public static int setMaxDepth(int maxDepth) Sets the max depth for reads on the current thread.- Parameters:
maxDepth- max depth, or -1 for no limit- Returns:
- the previous max depth, to be set again once done
-
increment
public static void increment() -
decrement
public static void decrement()
-