package com.bytedance.apm.trace.model.cross;

import X.C06182bw;
import com.bytedance.covode.number.Covode;
import java.util.ArrayList;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class TracingCrossManager {
    public static Map<Long, C06182bw> sCrossTracingContext = new ConcurrentHashMap();

    static {
        Covode.recordClassIndex(23525);
    }

    public static void unRegisterCross(long j) {
        sCrossTracingContext.remove(Long.valueOf(j));
    }

    public static void registerCross(long j, C06182bw r4) {
        sCrossTracingContext.put(Long.valueOf(j), r4);
    }

    public static void onPassBackAsChild(String str, String str2, ArrayList<NativeSpan> arrayList) {
        C06182bw r3 = sCrossTracingContext.get(Long.valueOf(Long.parseLong(str)));
        if (r3 != null) {
            sCrossTracingContext.remove(Long.valueOf(Long.parseLong(str)));
            r3.LIZ(str2, arrayList);
        }
    }

    public static void onPassBackAsReference(String str, String str2, ArrayList<NativeSpan> arrayList) {
        C06182bw r3 = sCrossTracingContext.get(Long.valueOf(Long.parseLong(str)));
        if (r3 != null) {
            sCrossTracingContext.remove(Long.valueOf(Long.parseLong(str)));
            r3.LIZIZ(str2, arrayList);
        }
    }
}
