All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.glowroot.central.LiveTraceRepositoryImpl Maven / Gradle / Ivy

There is a newer version: 0.14.0-beta.3
Show newest version
/*
 * Copyright 2016-2018 the original author or authors.
 *
 * Licensed 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.glowroot.central;

import java.util.List;

import com.google.common.collect.ImmutableList;
import org.checkerframework.checker.nullness.qual.Nullable;

import org.glowroot.common.live.LiveTraceRepository;
import org.glowroot.wire.api.model.ProfileOuterClass.Profile;
import org.glowroot.wire.api.model.TraceOuterClass.Trace;

class LiveTraceRepositoryImpl implements LiveTraceRepository {

    private final DownstreamServiceImpl downstreamService;

    LiveTraceRepositoryImpl(DownstreamServiceImpl downstreamService) {
        this.downstreamService = downstreamService;
    }

    @Override
    public Trace. /*@Nullable*/ Header getHeader(String agentId, String traceId) throws Exception {
        return downstreamService.getHeader(agentId, traceId);
    }

    @Override
    public @Nullable Entries getEntries(String agentId, String traceId) throws Exception {
        return downstreamService.getEntries(agentId, traceId);
    }

    @Override
    public @Nullable Queries getQueries(String agentId, String traceId) throws Exception {
        return downstreamService.getQueries(agentId, traceId);
    }

    @Override
    public @Nullable Profile getMainThreadProfile(String agentId, String traceId) throws Exception {
        return downstreamService.getMainThreadProfile(agentId, traceId);
    }

    @Override
    public @Nullable Profile getAuxThreadProfile(String agentId, String traceId) throws Exception {
        return downstreamService.getAuxThreadProfile(agentId, traceId);
    }

    @Override
    public @Nullable Trace getFullTrace(String agentId, String traceId) throws Exception {
        return downstreamService.getFullTrace(agentId, traceId);
    }

    @Override
    public int getMatchingTraceCount(String transactionType, @Nullable String transactionName) {
        return 0;
    }

    @Override
    public List getMatchingActiveTracePoints(TraceKind traceKind,
            String transactionType, @Nullable String transactionName, TracePointFilter filter,
            int limit, long captureTime, long captureTick) {
        return ImmutableList.of();
    }

    @Override
    public List getMatchingPendingPoints(TraceKind traceKind, String transactionType,
            @Nullable String transactionName, TracePointFilter filter, long captureTime) {
        return ImmutableList.of();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy