Package com.couchbase.client.core
Class CoreLimiter
- java.lang.Object
-
- com.couchbase.client.core.CoreLimiter
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
getFailIfInstanceLimitReached()
static int
getMaxAllowedInstances()
static int
numInstances()
static void
setFailIfInstanceLimitReached(boolean failIfInstanceLimitReached)
Configures if the SDK should fail to create instead of warn if the instance limit is reached.static void
setMaxAllowedInstances(int maxAllowedInstances)
Configures the maximum allowed core instances before warning/failing.
-
-
-
Method Detail
-
setMaxAllowedInstances
public static void setMaxAllowedInstances(int maxAllowedInstances)
Configures the maximum allowed core instances before warning/failing.- Parameters:
maxAllowedInstances
- the number of max allowed core instances. Must be greater than zero.
-
getMaxAllowedInstances
public static int getMaxAllowedInstances()
-
setFailIfInstanceLimitReached
public static void setFailIfInstanceLimitReached(boolean failIfInstanceLimitReached)
Configures if the SDK should fail to create instead of warn if the instance limit is reached.- Parameters:
failIfInstanceLimitReached
- true if it should throw an exception instead of warn.
-
getFailIfInstanceLimitReached
public static boolean getFailIfInstanceLimitReached()
-
numInstances
public static int numInstances()
-
-