| Modifier and Type | Field and Description |
|---|---|
static String |
EXTRACT_LIMIT_COUNT_LIMIT_KEY |
static String |
EXTRACT_LIMIT_POOL_SIZE_KEY |
static String |
EXTRACT_LIMIT_RATE_LIMIT_KEY |
static String |
EXTRACT_LIMIT_RATE_LIMIT_KEY_DEP
Deprecated.
|
static String |
EXTRACT_LIMIT_RATE_LIMIT_TIMEUNIT_KEY |
static String |
EXTRACT_LIMIT_RATE_LIMIT_TIMEUNIT_KEY_DEP
Deprecated.
|
static String |
EXTRACT_LIMIT_TIME_LIMIT_KEY |
static String |
EXTRACT_LIMIT_TIME_LIMIT_KEY_DEP
Deprecated.
|
static String |
EXTRACT_LIMIT_TIME_LIMIT_TIMEUNIT_KEY |
static String |
EXTRACT_LIMIT_TIME_LIMIT_TIMEUNIT_KEY_DEP
Deprecated.
|
static String |
EXTRACT_LIMIT_TYPE_KEY |
| Constructor and Description |
|---|
DefaultLimiterFactory() |
| Modifier and Type | Method and Description |
|---|---|
static Limiter |
newLimiter(State state)
Create a new
Limiter instance of one of the types in BaseLimiterType. |
public static final String EXTRACT_LIMIT_TYPE_KEY
public static final String EXTRACT_LIMIT_RATE_LIMIT_KEY
public static final String EXTRACT_LIMIT_RATE_LIMIT_TIMEUNIT_KEY
public static final String EXTRACT_LIMIT_TIME_LIMIT_KEY
public static final String EXTRACT_LIMIT_TIME_LIMIT_TIMEUNIT_KEY
public static final String EXTRACT_LIMIT_COUNT_LIMIT_KEY
public static final String EXTRACT_LIMIT_POOL_SIZE_KEY
@Deprecated public static final String EXTRACT_LIMIT_RATE_LIMIT_KEY_DEP
@Deprecated public static final String EXTRACT_LIMIT_RATE_LIMIT_TIMEUNIT_KEY_DEP
@Deprecated public static final String EXTRACT_LIMIT_TIME_LIMIT_KEY_DEP
@Deprecated public static final String EXTRACT_LIMIT_TIME_LIMIT_TIMEUNIT_KEY_DEP
public static Limiter newLimiter(State state)
Limiter instance of one of the types in BaseLimiterType.
Note this method will always return a new Limiter instance of one of the supported types defined
in BaseLimiterType as long as the input configuration specifies a supported BaseLimiterType.
It will throw an IllegalArgumentException if none of the supported BaseLimiterTypes is
specified or if any of the required configuration properties for the specified BaseLimiterType
is not present.
This method will return a functional Limiter if the configuration is correct. If instead, a
Limiter is optional or the caller is fine with a Limiter that is not really limiting any
events, then the caller should first make sure that the Limiter should indeed be created using
this method, or handle the exception (if any is thrown) appropriately.
state - a State instance carrying configuration propertiesLimiter instanceIllegalArgumentException - if the input configuration does not specify a valid supported