Package io.rong.imlib.model
Class RemoteHistoryMsgOption
-
- All Implemented Interfaces:
public class RemoteHistoryMsgOption
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
RemoteHistoryMsgOption.PullOrder
-
Constructor Summary
Constructors Constructor Description RemoteHistoryMsgOption()
RemoteHistoryMsgOption(long dataTime, int count, RemoteHistoryMsgOption.PullOrder pullOrder, boolean includeLocalExistMessage)
RemoteHistoryMsgOption(long dataTime, int count, int pullOrder, boolean includeLocalExistMessage)
-
Method Summary
Modifier and Type Method Description long
getDataTime()
获取开始拉取消息的时间点。即:消息中的 sentTime;如果本地库中没有消息,第一次可传 0,否则传入最早消息的 sentTime,获取最新 count 条。 void
setDataTime(long dataTime)
设置开始拉取消息的时间点。即:消息中的 sentTime;如果本地库中没有消息,第一次可传 0,否则传入最早消息的 sentTime,获取最新 count 条。 int
getCount()
获取要获取的消息数量,最多 100 条。 void
setCount(int count)
设置要获取的消息数量,最多 100 条。 int
getOrder()
获取拉取顺序。 0: 降序,结合传入的时间戳参数,获取发送时间递增的消息; 1: 升序,结合传入的时间戳参数,获取发送时间递减的消息。 void
setOrder(int pullOrder)
设置拉取顺序。 0: 降序,结合传入的时间戳参数,获取发送时间递增的消息;1: 升序,结合传入的时间戳参数,获取发送时间递减的消息。 void
setOrder(RemoteHistoryMsgOption.PullOrder pullOrder)
boolean
isIncludeLocalExistMessage()
是否需要重复拉取。 int
describeContents()
void
writeToParcel(Parcel dest, int flags)
int
getConversationCount(ConversationType type)
boolean
isNeedList()
String
toString()
void
setIncludeLocalExistMessage(boolean includeLocalExistMessage)
设置是否需要重复拉取。 void
setNeedList(boolean needList)
-
-
Constructor Detail
-
RemoteHistoryMsgOption
RemoteHistoryMsgOption()
-
RemoteHistoryMsgOption
RemoteHistoryMsgOption(long dataTime, int count, RemoteHistoryMsgOption.PullOrder pullOrder, boolean includeLocalExistMessage)
-
RemoteHistoryMsgOption
RemoteHistoryMsgOption(long dataTime, int count, int pullOrder, boolean includeLocalExistMessage)
-
-
Method Detail
-
getDataTime
long getDataTime()
获取开始拉取消息的时间点。即:消息中的 sentTime;如果本地库中没有消息,第一次可传 0,否则传入最早消息的 sentTime,获取最新 count 条。
- Returns:
开始拉取消息的时间点。即:消息中的 sentTime;如果本地库中没有消息,第一次可传 0,否则传入最早消息的 sentTime,获取最新 count 条。
-
setDataTime
void setDataTime(long dataTime)
设置开始拉取消息的时间点。即:消息中的 sentTime;如果本地库中没有消息,第一次可传 0,否则传入最早消息的 sentTime,获取最新 count 条。
- Parameters:
dataTime
- 开始拉取消息的时间点。即:消息中的 sentTime;如果本地库中没有消息,第一次可传 0,否则传入最早消息的 sentTime,获取最新 count 条。
-
getCount
int getCount()
获取要获取的消息数量,最多 100 条。
- Returns:
要获取的消息数量,最多 100 条。
-
setCount
void setCount(int count)
设置要获取的消息数量,最多 100 条。
- Parameters:
count
- 要获取的消息数量,最多 100 条。
-
getOrder
int getOrder()
获取拉取顺序。 0: 降序,结合传入的时间戳参数,获取发送时间递增的消息; 1: 升序,结合传入的时间戳参数,获取发送时间递减的消息。
- Returns:
拉取顺序。0: 降序,结合传入的时间戳参数,获取发送时间递增的消息;1: 升序,结合传入的时间戳参数,获取发送时间递减的消息。
-
setOrder
@Deprecated() void setOrder(int pullOrder)
设置拉取顺序。 0: 降序,结合传入的时间戳参数,获取发送时间递增的消息;1: 升序,结合传入的时间戳参数,获取发送时间递减的消息。
- Parameters:
pullOrder
- 拉取顺序。0: 降序,结合传入的时间戳参数,获取发送时间递增的消息;1: 升序,结合传入的时间戳参数,获取发送时间递减的消息。
-
setOrder
void setOrder(RemoteHistoryMsgOption.PullOrder pullOrder)
-
isIncludeLocalExistMessage
boolean isIncludeLocalExistMessage()
是否需要重复拉取。
- Returns:
是否需要重复拉取
true
拉取回来的消息,本地数据库存在,继续返回给用户;false
拉取回来的消息,本地数据库存在,不返回给客户,只返回数据库中不存在的。
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
getConversationCount
int getConversationCount(ConversationType type)
-
isNeedList
boolean isNeedList()
-
toString
String toString()
-
setIncludeLocalExistMessage
void setIncludeLocalExistMessage(boolean includeLocalExistMessage)
设置是否需要重复拉取。
- Parameters:
includeLocalExistMessage
- 是否需要重复拉取true
拉取回来的消息,本地数据库存在,继续返回给用户;false
拉取回来的消息,本地数据库存在,不返回给客户,只返回数据库中不存在的。
-
setNeedList
void setNeedList(boolean needList)
-
-
-
-