* Rename: MetricsLeapArray -> BucketLeapArray
* Add implementation for `FutureBucketLeapArray`, a kind of `BucketLeapArray` that only reserves for future buckets, which is used for calculating occupied future tokens.
* Add OccupiableBucketLeapArray that combines common BucketLeapArray with FutureBucketLeapArray. The rollingNumberInSecond in StatisticNode now uses OccupiableBucketLeapArray by default.
* Add OccupySupport interface. Node now implements OccupySupport interface.
* Add occupy-related methods in Metric and ArrayMetric.
* Handle prioritized requests in default traffic shaping controller.
* Update default occupyTimeout to 500ms
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
* Add a ApiCommandHandler which fetch all registered CommandHandlers so that user can get all available CommandHandlers by request /api
* Add a customized CommandHandler demo
- The NPE will occur when multiple threads are trying to create the connection group for the same namespace
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Add `UnaryLeapArray` and `RequestLimiter` to enable simple QPS limit
- Improve cluster rule manager and server config manager to support request limiter
- Support `TOO_MANY_REQUEST` status in client side
- Also improve the automatic namespace register of embedded server mode
Signed-off-by: Eric Zhao <sczyh16@gmail.com>