NIMSDK-AOS  9.19.0
MiscService.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.misc;
2 
4 
5 import java.util.List;
6 
7 /**
8  * 其他接口类,提供日志文件上传、SDK 本地缓存、获取云信服务端时间等接口。
9  */
10 public interface MiscService {
11 
12  /**
13  * 将多个日志文件打包成一个 zip 压缩文件并返回其路径。
14  * @return zip 压缩包所在的完整路径。
15  */
17 
18  /**
19  * 获取指定时间范围内指定类型的文件在 SDK 缓存中的大小。
20  * @param fileTypes 文件类型列表
21  * @param startTime 开始时间,单位毫秒,设置为 0 表示不限制起始时间。
22  * @param endTime 结束时间,单位毫秒,设置为 0 表示不限制结束时间。
23  * @return 缓存大小
24  */
25  InvocationFuture<Long> getSizeOfDirCache(List<DirCacheFileType> fileTypes, long startTime, long endTime);
26 
27  /**
28  * 删除指定时间范围内指定类型的文件的 SDK 缓存。
29  * @param fileTypes 文件类型列表
30  * @param startTime 开始时间,单位毫秒,设置为 0 表示不限制起始时间。
31  * @param endTime 结束时间,单位毫秒,设置为 0 表示不限制结束时间。
32  * @return 无返回值
33  */
34  InvocationFuture<Void> clearDirCache(List<DirCacheFileType> fileTypes, long startTime, long endTime);
35 
36  /**
37  * 获取服务器当前的时间戳。
38  * 频控限制详见 {@link com.netease.nimlib.sdk.SDKOptions#fetchServerTimeInterval}
39  * @return 如果调用处于频控限制内,返回的时间为上一次获取时间+两次时间的偏移量。
40  */
42 
43  /**
44  * 主动上传 SDK 日志。
45  * @param cut true:上传部分日志;false:上传全部日志
46  * @param roomId 聊天室 ID,可设置为空。
47  * @param uploadMsg 上传附言,长度上限为 4096 个字符,可设置为空。
48  *
49  * @return {@link InvocationFuture} 日志上传结果
50  */
51  InvocationFuture<String> getSdkLogUpload(boolean cut, String roomId, String uploadMsg);
52 
53 }
InvocationFuture< Long > getServerTime()
获取服务器当前的时间戳。 频控限制详见 com.netease.nimlib.sdk.SDKOptions#fetchServerTimeInterval ...
InvocationFuture< Long > getSizeOfDirCache(List< DirCacheFileType > fileTypes, long startTime, long endTime)
获取指定时间范围内指定类型的文件在 SDK 缓存中的大小。
InvocationFuture< String > zipLogs()
将多个日志文件打包成一个 zip 压缩文件并返回其路径。
其他接口类,提供日志文件上传、SDK 本地缓存、获取云信服务端时间等接口。
InvocationFuture< String > getSdkLogUpload(boolean cut, String roomId, String uploadMsg)
主动上传 SDK 日志。
InvocationFuture< Void > clearDirCache(List< DirCacheFileType > fileTypes, long startTime, long endTime)
删除指定时间范围内指定类型的文件的 SDK 缓存。