ObjectStorageRouter
7/8/26Less than 1 minute
ObjectStorageRouter
Info
Registry component that routes storage operations to the correct provider implementation by StorageProvider enum.
Overview
ObjectStorageRouter collects all ObjectStorageClient implementations via Spring injection and indexes them by their StorageProvider enum value. Callers request a client by provider name, eliminating direct dependency on concrete implementations.
Methods
| Method | Description |
|---|---|
get(StorageProvider) | Returns the client for the given provider; throws IllegalArgumentException if unsupported |
Supported Providers
| Enum | Client | Description |
|---|---|---|
R2 | R2StorageService | Cloudflare R2 |
OSS | OssService | Alibaba Cloud OSS |
COS | CosStorageService | Tencent Cloud COS |
Tips
The router uses an EnumMap internally for O(1) provider lookup.
Changelog
7/8/26, 5:52 AM
View All Changelog
9f290-on

