Add skeletton to save traces.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package org.codiki.infrastructure.traffic;
|
||||
|
||||
import org.codiki.domain.traffic.model.TrafficTrace;
|
||||
import org.codiki.domain.traffic.port.TrafficTracePort;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class TrafficTraceInMemoryAdapter implements TrafficTracePort {
|
||||
private final List<TrafficTrace> traces = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void save(TrafficTrace trace) {
|
||||
traces.add(trace);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TrafficTrace> getAllInPeriod(ZonedDateTime startDate, ZonedDateTime endDate) {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TrafficTrace> getAllByCorrelationId(String correlationId) {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countAllInPeriod(ZonedDateTime startDate, ZonedDateTime endDate) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countByCorrelationId(String correlationId) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user