Package com.couchbase.client.core
Class CoreLimiter
java.lang.Object
com.couchbase.client.core.CoreLimiter
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static int
static int
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 Details
-
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()
-