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

com.vmlens.trace.agent.bootstrap.StaticMonitorRepository Maven / Gradle / Ivy

There is a newer version: 1.1.5
Show newest version
package com.vmlens.trace.agent.bootstrap;


import gnu.trove.map.hash.TObjectIntHashMap;



public class StaticMonitorRepository {


	private static TObjectIntHashMap className2Id = new TObjectIntHashMap();
	private static int maxId=0;

	public static synchronized int getOrCreate(String className)
	{

		if( className2Id.contains(className) )
		{
			return className2Id.get(className);
		}


		    int	result = maxId;
			maxId++;
			className2Id.put(className, result);



		return result;
	}



}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy