ITopologyQueryDAO.java 4.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package org.apache.skywalking.oap.server.core.storage.query;

import java.io.IOException;
import java.util.List;
23
import org.apache.skywalking.oap.server.core.analysis.Downsampling;
24 25 26 27
import org.apache.skywalking.oap.server.core.analysis.manual.relation.instance.ServiceInstanceRelationClientSideMetrics;
import org.apache.skywalking.oap.server.core.analysis.manual.relation.instance.ServiceInstanceRelationServerSideMetrics;
import org.apache.skywalking.oap.server.core.analysis.manual.relation.service.ServiceRelationClientSideMetrics;
import org.apache.skywalking.oap.server.core.analysis.manual.relation.service.ServiceRelationServerSideMetrics;
28
import org.apache.skywalking.oap.server.core.query.entity.Call;
29 30 31
import org.apache.skywalking.oap.server.library.module.Service;

public interface ITopologyQueryDAO extends Service {
32 33 34
    /**
     * Query {@link ServiceRelationServerSideMetrics} through the given conditions
     */
35
    List<Call.CallDetail> loadSpecifiedServerSideServiceRelations(Downsampling downsampling, long startTB, long endTB,
36
                                                                  List<Integer> serviceIds) throws IOException;
37

38 39 40
    /**
     * Query {@link ServiceRelationClientSideMetrics} through the given conditions
     */
41
    List<Call.CallDetail> loadSpecifiedClientSideServiceRelations(Downsampling downsampling, long startTB, long endTB,
42
                                                                  List<Integer> serviceIds) throws IOException;
43

44 45 46
    /**
     * Query {@link ServiceRelationServerSideMetrics} globally, without given serviceIds
     */
47
    List<Call.CallDetail> loadServerSideServiceRelations(Downsampling downsampling, long startTB,
48
                                                         long endTB) throws IOException;
49

50 51 52
    /**
     * Query {@link ServiceRelationClientSideMetrics} globally, without given serviceIds
     */
53
    List<Call.CallDetail> loadClientSideServiceRelations(Downsampling downsampling, long startTB,
54
                                                         long endTB) throws IOException;
55

56 57 58 59 60 61 62 63 64
    /**
     * Query {@link ServiceInstanceRelationServerSideMetrics} through given conditions, including the specific
     * clientServiceId and serverServiceId
     */
    List<Call.CallDetail> loadServerSideServiceInstanceRelations(int clientServiceId,
                                                                 int serverServiceId,
                                                                 Downsampling downsampling,
                                                                 long startTB,
                                                                 long endTB) throws IOException;
65

66 67 68 69 70 71 72 73 74
    /**
     * Query {@link ServiceInstanceRelationClientSideMetrics} through given conditions, including the specific
     * clientServiceId and serverServiceId
     */
    List<Call.CallDetail> loadClientSideServiceInstanceRelations(int clientServiceId,
                                                                 int serverServiceId,
                                                                 Downsampling downsampling,
                                                                 long startTB,
                                                                 long endTB) throws IOException;
75

76 77 78 79 80 81
    /**
     * Query the endpoint relationship. Endpoint dependency is not detected from server side agent.
     */
    List<Call.CallDetail> loadSpecifiedDestOfServerSideEndpointRelations(Downsampling downsampling,
                                                                         long startTB,
                                                                         long endTB,
82
                                                                         String destEndpointId) throws IOException;
83
}