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

scouter.agent.trace.TransferMap Maven / Gradle / Ivy

There is a newer version: 2.20.0
Show newest version
package scouter.agent.trace;

import scouter.lang.step.ThreadCallPossibleStep;
import scouter.util.IntKeyLinkedMap;

public class TransferMap {
	public static class ID {
		public long gxid;
		public long caller;
		public long callee;
		public byte xType;
		public long callerThreadId;
		public ThreadCallPossibleStep tcStep;

		public ID(long gxid, long caller, long callee, byte xType) {
			this(gxid, caller, callee, xType, 0L, null);
		}

		public ID(long gxid, long caller, long callee, byte xType, long callerThreadId, ThreadCallPossibleStep tcStep) {
			this.gxid = gxid;
			this.caller = caller;
			this.callee = callee;
			this.xType = xType;
			this.callerThreadId = callerThreadId;
			this.tcStep = tcStep;
		}
	}

	private static IntKeyLinkedMap map = new IntKeyLinkedMap().setMax(2001);

	public static void put(int hash, long gxid, long caller, long callee, byte xType) {
		put(hash, gxid, caller, callee, xType, 0L, null);
	}

	public static void put(int hash, long gxid, long caller, long callee, byte xType, long callerThreadId, ThreadCallPossibleStep tcStep) {
		map.put(hash, new ID(gxid, caller, callee, xType, callerThreadId, tcStep));
	}

	public static void remove(int hash) {
		map.remove(hash);
	}

	public static ID get(int hash) {
		return map.get(hash);
	}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy