#
Junjie
9 天以前 dc3f9cc91759823ce59486f19b138be4b296a0f1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.zy.asrs.service;
 
import com.zy.asrs.domain.replay.ReplayChunk;
import com.zy.asrs.domain.replay.ReplaySeekResult;
 
import java.util.Map;
 
public interface DeviceLogReplayService {
 
    Map<String, Object> createSession(String day,
                                      String type,
                                      Integer deviceNo,
                                      Integer stationId,
                                      Long targetTimestamp,
                                      Long windowStartTimeMs,
                                      Long windowEndTimeMs);
 
    class ReplayWindowException extends RuntimeException {
        private final String errorCode;
 
        public ReplayWindowException(String errorCode, String message) {
            super(message);
            this.errorCode = errorCode;
        }
 
        public String getErrorCode() {
            return errorCode;
        }
    }
 
    Map<String, Object> loadTimeline(String sessionId);
 
    Map<String, Object> loadTimelineSummary(String sessionId, Integer bucketCount);
 
    ReplayChunk loadChunk(String sessionId, Integer chunkIndex);
 
    ReplayChunk loadChunk(String sessionId, Integer chunkIndex, boolean fullFrames);
 
    ReplaySeekResult seek(String sessionId, Long timestamp, Long sampleSeq);
 
    Map<String, Object> resolveDevice(String sessionId, String type, Integer deviceNo, Integer stationId, Long timestamp);
 
    void closeSession(String sessionId);
}