com.envision.event.api.EventWriteRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eos-event-api-new Show documentation
Show all versions of eos-event-api-new Show documentation
1.0 初版
1.1 增加了event的flag和custom_attr字段。
The newest version!
package com.envision.event.api;
import com.envision.event.bean.Event;
import java.io.Serializable;
/**
* 事件写入请求
*
* @author kang.ouyang
*
*/
public class EventWriteRequest implements Serializable {
private final Event event;
public EventWriteRequest(Event event) {
this.event = event;
}
public Event getEvent() {
return event;
}
/**
* 写事件需要根据deviceId粘联分配(同一个deviceId的写请求应该分发到同一个服务实例上处理)
*/
public int hashCode() {
if (event == null || event.getDeviceID() == null) {
return 0;
}
return event.getDeviceID().hashCode();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy