代码整理

This commit is contained in:
wyl
2023-04-30 18:45:03 +08:00
parent feae52fe04
commit f6bea9b21f
@@ -1,9 +1,9 @@
package com.aivfo.dfs.client.core.properties.client;
import com.aivfo.dfs.client.core.properties.FastDFSProperties;
import csource.fastdfs.*;
import csource.fastdfs.pool.Connection;
import lombok.extern.slf4j.Slf4j;
import org.csource.fastdfs.*;
import org.csource.fastdfs.pool.Connection;
import java.io.IOException;
import java.util.Map;
@@ -34,7 +34,7 @@ public class FastDFSClient implements Client {
* @return org.csource.fastdfs.StorageClient
* @Date 2023/4/28
* @Author wangyl
* @see org.csource.fastdfs.StorageClient#releaseConnection(Connection, boolean)
* @see csource.fastdfs.StorageClient#releaseConnection(Connection, boolean)
* 对象都是非线程安全的 所以每次调用的时候都需要初始化 storageServer 这个对象源码在每次操作后都会被设置为null
*/
private StorageClient getStorageClient() throws IOException {
@@ -42,6 +42,7 @@ public class FastDFSClient implements Client {
TrackerServer trackerServer = tracker.getTrackerServer();
StorageServer storageServer = null;
StorageClient storageClient = new StorageClient(trackerServer, storageServer);
return storageClient;
}
@Override
@@ -65,8 +66,9 @@ public class FastDFSClient implements Client {
}
private String updateFile() throws IOException {
//TODO 处理上传文件最底层接口
StorageClient storageClient = getStorageClient();
storageClient.upload_file()
return "";
}
}