- Notifications
You must be signed in to change notification settings - Fork28
fastdfs client for java, based on netty.
License
NotificationsYou must be signed in to change notification settings
coding4m/fastdfs-client
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
fastdfs-client is aFastDFS java clientbased onNetty 4 . support multiple tracker server pool and active tracker server health check .
- Java 8+
// FastdfsClient is threadsafe and use connection pool.FastdfsClientclient =FastdfsClient.newBuilder() .connectTimeout(3000) .readTimeout(100) .healthCheck(3,2,3000,10000) .tracker("192.168.1.2",22222) .build();// upload fileCompletableFuture<FileId>promise =client.upload(newFile("/tmp/test.dmg"));FileIdfileId =promise.get();// do something.// download fileOutputStreamout = ...CompletableFuture<Void>promise =client.download(fileId,out);// promise.whenComplete(...);// delete fileCompletableFuture<Void>promise =client.delete(fileId);// promise.whenComplete(...);// get file infoCompletableFuture<FileInfo>promise =client.infoGet(fileId);FileInfofileInfo =promise.get();// do something.// set file metadataFileMetadatametadata =FileMetadata.newBuilder().put("test","test1").build();CompletableFuture<Void>promise =client.metadataSet(fileId,metadata);// do something.// get file metadataCompletableFuture<FileMetadata>promise =client.metadataGet(fileId);FileMetadatametadata =promise.get();// do something.client.close();
About
fastdfs client for java, based on netty.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.