补充缺失的注释。

This commit is contained in:
刘小平 2024-11-29 17:51:56 +08:00
parent 74ea6b6e8d
commit e5d404baa3
7 changed files with 57 additions and 4 deletions

View File

@ -76,6 +76,9 @@ public class FileCheckResultVo {
@Schema(description = "分块信息")
private List<Part> partList = new ArrayList<>();
/**
* 分块信息实体定义
*/
@Getter
@Setter
public static class Part {

View File

@ -41,6 +41,9 @@ public class FilePreShardingVo {
@Schema(description = "分块信息")
private List<Part> partList = new ArrayList<>();
/**
* 分块信息实体定义
*/
@Getter
@Setter
public static class Part {

View File

@ -8,6 +8,12 @@ import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* 分片信息列表
*
* @author contact@liuxp.me
* @since 2024/11/14
*/
@Getter
@Setter
@ToString
@ -23,25 +29,41 @@ public class ListParts {
private List<Part> partList = null;
/**
* 构造方法
* @return 分块列表
*/
public static ListParts build(){
ListParts listParts = new ListParts();
listParts.setPartList(new ArrayList<>());
return listParts;
}
/**
* 文件分块信息定义
*/
@Getter
@Setter
@ToString
public static class Part{
// 分块序号
private int partNumber;
// 分块标签(默认是MD5)
private String etag;
// 修改时间
private ZonedDateTime lastModified;
// 分块大小
private Long size;
}
/**
* 增加分块
* @param partNumber 分块序号
* @param etag 分块标签
* @param lastModified 最后修改时间
* @param size 分块大小
*/
public void addPart(int partNumber, String etag, ZonedDateTime lastModified, Long size){
Part part = new Part();

View File

@ -16,7 +16,10 @@ import java.security.NoSuchAlgorithmException;
*/
public class CustomMinioClient extends MinioAsyncClient {
/**
* 构造方法
* @param client Minio异步客户端
*/
public CustomMinioClient(MinioAsyncClient client) {
super(client);
}

View File

@ -26,6 +26,12 @@ import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
/**
* MinIO S3文件存储引擎接口定义实现类
*
* @author contact@liuxp.me
* @since 2024/11/14
*/
@Slf4j
public class MinioS3ClientImpl implements MinioS3Client {
@ -46,10 +52,18 @@ public class MinioS3ClientImpl implements MinioS3Client {
private CustomMinioClient minioClient = null;
/**
* 构造方法
* @param properties MinioPlus 配置
*/
public MinioS3ClientImpl(MinioPlusProperties properties) {
this.properties = properties;
}
/**
* 获取 Minio 客户端
* @return Minio 客户端
*/
public CustomMinioClient getClient() {
if (null == this.minioClient) {

View File

@ -47,6 +47,10 @@ public class StorageController implements StorageWebAPI {
*/
private final StorageService storageService;
/**
* 构造方法
* @param storageService 注入存储引擎Service接口定义实现类
*/
public StorageController(StorageService storageService) {
this.storageService = storageService;
}

View File

@ -47,6 +47,10 @@ public class StorageController implements StorageWebAPI {
*/
private final StorageService storageService;
/**
* 构造方法
* @param storageService 注入存储引擎Service接口定义实现类
*/
public StorageController(StorageService storageService) {
this.storageService = storageService;
}