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

com.vmlens.trace.agent.bootstrap.callback.state.ModeStateObject Maven / Gradle / Ivy

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

import com.vmlens.trace.agent.bootstrap.callback.CallbackStatePerThread;
import com.vmlens.trace.agent.bootstrap.callback.field.UpdateObjectState;



public class ModeStateObject extends ModeStateAbstract{

	public final long id;

	private static long maxId = 0;
	
	
	

	public ModeStateObject(long lastThreadId) {
		super();
		this.lastThreadId = lastThreadId;
		this.id = getNewId();
	}




	public synchronized static long getNewId() {
		maxId++;
		return maxId;
	}
	


	@Override
	protected void write(int slidingWindowId, int classOrFieldId, int methodId, int operation,
			UpdateObjectState updateObjectStateNew, CallbackStatePerThread callbackStatePerThread) {
		updateObjectStateNew.sendStateEvent4Object(slidingWindowId,  classOrFieldId, id ,  methodId,  operation ,callbackStatePerThread );
		
	}




	@Override
	protected void writeInitial(int currentSlidingWindowId, int classOrFieldId, long threadIdAtAccess, int methodId,
			int methodCount, int operation, int slidingWindowIdAtAccess, UpdateObjectState updateObjectStateNew,
			CallbackStatePerThread callbackStatePerThread) {
		
		
		updateObjectStateNew.sendStateEventInitial4Object(currentSlidingWindowId,  classOrFieldId, id , threadIdAtAccess ,
				methodId,  methodCount , operation , slidingWindowIdAtAccess ,callbackStatePerThread );
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy